### Question:
GravatarService { public void chooseImage() { final List<String> images = gravatarProperties.getImages(); final List<String> addresses = gravatarProperties.getAddresses(); gravatar.chooseImage(images, addresses); }  void chooseImage();  }### Answer:
@Test public void chooseImageTest() { @SuppressWarnings("unchecked") final List<String> images = Mockito.mock(List.class); @SuppressWarnings("unchecked") final List<String> addresses = Mockito.mock(List.class); when(gravatarProperties.getImages()).thenReturn(images); when(gravatarProperties.getAddresses()).thenReturn(addresses); doNothing().when(gravatar).chooseImage(images, addresses); gravatarService.chooseImage(); verify(gravatarProperties).getImages(); verify(gravatarProperties).getAddresses(); verify(gravatar).chooseImage(images, addresses); }