### Question:
HalflingThief { public void steal() { method.steal(); } HalflingThief(StealingMethod method); void steal(); void changeMethod(StealingMethod method);  }### Answer:
@Test public void testSteal() { final var method = mock(StealingMethod.class); final var thief = new HalflingThief(method); thief.steal(); verify(method).steal(); verifyNoMoreInteractions(method); }
@Test public void testSteal() { final StealingMethod method = mock(StealingMethod.class); final HalflingThief thief = new HalflingThief(method); thief.steal(); verify(method).steal(); verifyNoMoreInteractions(method); }