### Question:
ThrowOnNoResolutionBehaviour implements FixtureBehaviour { @Override public SpecimenBuilder transform(SpecimenBuilder builder) { if (builder == null) throw new IllegalArgumentException(); return new NoResolutionGuard(builder, new ThrowingNoResolutionHandler()); }  @Override SpecimenBuilder transform(SpecimenBuilder builder);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void null_builder_throws_exception() { this.behaviour.transform(null); }
@Test public void returns_instance_of_no_resolution_guard() { SpecimenBuilder transformed = this.behaviour.transform(this.mockSpecimenBuilder); assertTrue(transformed instanceof NoResolutionGuard); }
@Test public void no_resolution_guard_is_given_the_builder() { NoResolutionGuard guard = (NoResolutionGuard)this.behaviour.transform(this.mockSpecimenBuilder); assertSame(guard.builder(), this.mockSpecimenBuilder); }
@Test public void no_resolution_guard_is_given_throwing_handler() { NoResolutionGuard guard = (NoResolutionGuard)this.behaviour.transform(this.mockSpecimenBuilder); assertTrue(guard.handler() instanceof ThrowingNoResolutionHandler); }