@Test public void proxyDocumentWithPDFDocumentTypeShouldReturnValidationReport() throws Exception { when(applicationContext.getBean(GENERIC_VALIDATION_SERVICE_BEAN)).thenReturn(validationServiceSpy); ProxyDocument proxyDocument = mockProxyDocumentWithDocument(DocumentType.PDF); SimpleReport report = validationProxy.validate(proxyDocument); assertSimpleReport(report); }
public SimpleReport validate(ProxyRequest proxyRequest) { long validationStartTime = System.nanoTime(); SimpleReport report = validateRequest(proxyRequest); long validationDuration = System.nanoTime() - validationStartTime; publishStatistics(proxyRequest, report, validationDuration); addWarningForTestEnvironment(report); return report; }
ValidationProxy { public SimpleReport validate(ProxyRequest proxyRequest) { long validationStartTime = System.nanoTime(); SimpleReport report = validateRequest(proxyRequest); long validationDuration = System.nanoTime() - validationStartTime; publishStatistics(proxyRequest, report, validationDuration); addWarningForTestEnvironment(report); return report; } }
ValidationProxy { public SimpleReport validate(ProxyRequest proxyRequest) { long validationStartTime = System.nanoTime(); SimpleReport report = validateRequest(proxyRequest); long validationDuration = System.nanoTime() - validationStartTime; publishStatistics(proxyRequest, report, validationDuration); addWarningForTestEnvironment(report); return report; } @Autowired  ValidationProxy(StatisticsService statisticsService, ApplicationContext applicationContext, Environment environment); }
ValidationProxy { public SimpleReport validate(ProxyRequest proxyRequest) { long validationStartTime = System.nanoTime(); SimpleReport report = validateRequest(proxyRequest); long validationDuration = System.nanoTime() - validationStartTime; publishStatistics(proxyRequest, report, validationDuration); addWarningForTestEnvironment(report); return report; } @Autowired  ValidationProxy(StatisticsService statisticsService, ApplicationContext applicationContext, Environment environment); SimpleReport validate(ProxyRequest proxyRequest); }
ValidationProxy { public SimpleReport validate(ProxyRequest proxyRequest) { long validationStartTime = System.nanoTime(); SimpleReport report = validateRequest(proxyRequest); long validationDuration = System.nanoTime() - validationStartTime; publishStatistics(proxyRequest, report, validationDuration); addWarningForTestEnvironment(report); return report; } @Autowired  ValidationProxy(StatisticsService statisticsService, ApplicationContext applicationContext, Environment environment); SimpleReport validate(ProxyRequest proxyRequest);  }