Fix ExpectedException in ImmutabilityEnforcementFactoryTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/fb66c362 Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/fb66c362 Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/fb66c362 Branch: refs/heads/master Commit: fb66c362e202caac454e4f47aa3de1444c180e52 Parents: 8b76570 Author: Thomas Groh <[email protected]> Authored: Wed Apr 6 16:21:34 2016 -0700 Committer: Dan Halperin <[email protected]> Committed: Wed Apr 6 16:45:01 2016 -0700 ---------------------------------------------------------------------- .../runners/inprocess/ImmutabilityEnforcementFactoryTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/fb66c362/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/runners/inprocess/ImmutabilityEnforcementFactoryTest.java ---------------------------------------------------------------------- diff --git a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/runners/inprocess/ImmutabilityEnforcementFactoryTest.java b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/runners/inprocess/ImmutabilityEnforcementFactoryTest.java index 114c6ab..e65b178 100644 --- a/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/runners/inprocess/ImmutabilityEnforcementFactoryTest.java +++ b/sdks/java/core/src/test/java/com/google/cloud/dataflow/sdk/runners/inprocess/ImmutabilityEnforcementFactoryTest.java @@ -94,7 +94,7 @@ public class ImmutabilityEnforcementFactoryTest implements Serializable { ModelEnforcement<byte[]> enforcement = factory.forBundle(elements, consumer); enforcement.beforeElement(element); element.getValue()[0] = 'f'; - thrown.equals(UserCodeException.class); + thrown.expect(UserCodeException.class); thrown.expectCause(isA(IllegalMutationException.class)); thrown.expectMessage(consumer.getFullName()); thrown.expectMessage("illegaly mutated"); @@ -118,7 +118,7 @@ public class ImmutabilityEnforcementFactoryTest implements Serializable { enforcement.afterElement(element); element.getValue()[0] = 'f'; - thrown.equals(UserCodeException.class); + thrown.expect(UserCodeException.class); thrown.expectCause(isA(IllegalMutationException.class)); thrown.expectMessage(consumer.getFullName()); thrown.expectMessage("illegaly mutated");
