@Test public void validateAfterDownload_resultIsValid_nullReturned() throws Exception { final AbbyyInput abbyyInput = mock(AbbyyInput.class); String resultMock = PowerMockito.mock(String.class); when(resultMock.getBytes()).thenReturn(new byte[(int)Limits.MAX_SIZE_OF_TXT_FILE - 1]); ValidationException ex = sut.validateAfterDownload(abbyyInput, resultMock); assertNull(ex); }
public ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result) throws Exception { try { validateSizeAfterDownload(abbyyInput, result); return null; } catch (ValidationException ex) { return ex; } }
TxtResultValidator implements AbbyyResultValidator { public ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result) throws Exception { try { validateSizeAfterDownload(abbyyInput, result); return null; } catch (ValidationException ex) { return ex; } } }
TxtResultValidator implements AbbyyResultValidator { public ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result) throws Exception { try { validateSizeAfterDownload(abbyyInput, result); return null; } catch (ValidationException ex) { return ex; } } TxtResultValidator(@NotNull AbbyyApi abbyyApi); }
TxtResultValidator implements AbbyyResultValidator { public ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result) throws Exception { try { validateSizeAfterDownload(abbyyInput, result); return null; } catch (ValidationException ex) { return ex; } } TxtResultValidator(@NotNull AbbyyApi abbyyApi); ValidationException validateBeforeDownload(@NotNull AbbyyInput abbyyInput, @NotNull String downloadUrl); ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result); }
TxtResultValidator implements AbbyyResultValidator { public ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result) throws Exception { try { validateSizeAfterDownload(abbyyInput, result); return null; } catch (ValidationException ex) { return ex; } } TxtResultValidator(@NotNull AbbyyApi abbyyApi); ValidationException validateBeforeDownload(@NotNull AbbyyInput abbyyInput, @NotNull String downloadUrl); ValidationException validateAfterDownload(@NotNull AbbyyInput abbyyInput, @NotNull String result);  }