@Test public void shouldReturnRangeThreeToTarget() { when(targetCoordinate.getDistanceTo(agentCoordinate)).thenReturn(RANGE_THREE_DISTANCE); assertThat(underTest.getRangeToTarget(target), is(3)); }
private void mockCoordinates() { when(agentPosition.getCenter()).thenReturn(agentCoordinate); when(targetCoordinate.getDistanceTo(agentCoordinate)).thenReturn(RANGE_THREE_DISTANCE); }