@Test
public void testValidateEmptyFile() {

    final ValidatorWithReasonCallback validatorWithReasonCallback = mock(ValidatorWithReasonCallback.class);
    when(uploadWidget.getFilenameSelectedToUpload()).thenReturn("");
    handler.validate("filename", validatorWithReasonCallback);
    verify(uploadWidget).addStyleName(ValidationState.ERROR.getCssName());
}