@Test public void throwsExceptionWhenBadStatus() throws IOException { URI localUri = null; try { setStorageUri("http: MarkupResult markup = createMarkupResult(); localUri = URI.create(markup.getMarkupUri()); _nginxStorageService.store(markup); fail("Expected exception"); } catch (StorageException e) { assertEquals(3, BAD_PATH_POST_COUNT.intValue()); assertNotNull(localUri); assertTrue(Files.exists(Paths.get(localUri))); } }
@Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } @Inject  CustomNginxStorageBackend(
            PropertiesUtil propertiesUtil,
            ObjectMapper objectMapper,
            InProgressBatchJobsService inProgressBatchJobs); }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } @Inject  CustomNginxStorageBackend(
            PropertiesUtil propertiesUtil,
            ObjectMapper objectMapper,
            InProgressBatchJobsService inProgressBatchJobs); @Override boolean canStore(JsonOutputObject outputObject); @Override URI store(JsonOutputObject outputObject); @Override boolean canStore(MarkupResult markupResult); @Override void store(MarkupResult markupResult); @Override boolean canStore(ArtifactExtractionRequest request); @Override Table<Integer, Integer, URI> storeArtifacts(ArtifactExtractionRequest request); URI store(URI serviceUri, InputStream content); }
CustomNginxStorageBackend implements StorageBackend { @Override public URI store(JsonOutputObject outputObject) throws StorageException { URI serviceUri = getServiceUri(outputObject.getJobId()); try (PipeStream inputStream = createJsonInputStream(outputObject)) { return store(serviceUri, inputStream); } } @Inject  CustomNginxStorageBackend(
            PropertiesUtil propertiesUtil,
            ObjectMapper objectMapper,
            InProgressBatchJobsService inProgressBatchJobs); @Override boolean canStore(JsonOutputObject outputObject); @Override URI store(JsonOutputObject outputObject); @Override boolean canStore(MarkupResult markupResult); @Override void store(MarkupResult markupResult); @Override boolean canStore(ArtifactExtractionRequest request); @Override Table<Integer, Integer, URI> storeArtifacts(ArtifactExtractionRequest request); URI store(URI serviceUri, InputStream content);  }