### Question:
BookmeterService { public void updateImage(byte[] image) throws InterruptedException { checkArgument(ArrayUtils.isNotEmpty(image), "`image` should not be empty."); bookmeter.updateProfileImage(image); }  void updateImage(byte[] image);  }### Answer:
@Test @SneakyThrows public void updateImageTest() { final byte[] imageBytes = new byte[]{0x00, 0x01, 0x02}; doNothing().when(bookmeter).updateProfileImage(imageBytes); bookmeterService.updateImage(imageBytes); verify(bookmeter).updateProfileImage(imageBytes); }
@Test @SneakyThrows public void updateImageTest_nullImage() { expectedException.expectMessage("`image` should not be empty."); expectedException.expect(IllegalArgumentException.class); bookmeterService.updateImage(null); verify(bookmeter, never()).updateProfileImage(any()); }