@Test
public void userSetIncorrectAvatarShouldGetDefaultAvatar() throws ImageProcessException, NotFoundException {
//ARRANGE
byte[] avatar = new byte[10];
doThrow(new ImageFormatException("test")).when(imageService).validateImageFormat(any(byte[].class));
doThrow(new ImageSizeException(1)).when(imageService).validateImageSize(any(byte[].class));
//ACT
defaultAvatarEditor.setAsText(String.valueOf(avatar));
//ASSERT
verify(imageService, times(1)).getDefaultImage();
}