@Test public void testProbeContentType() throws Exception { final ReadFileService service = new ReadFileService(); assertNotNull(service.contentTypeProbe()); ReadFileService.ContentTypeProbe myProbe = e -> { return Files.probeContentType(e.toPath()); }; service.setContentTypeProbe(myProbe); assertEquals(myProbe, service.getContentTypeProbe()); assertEquals(myProbe, service.contentTypeProbe()); }
private String probeContentType(File file) throws IOException { return defaultIfBlank(contentTypeProbe().probeContentType(file), ""); }
ReadFileService extends ServiceImp { private String probeContentType(File file) throws IOException { return defaultIfBlank(contentTypeProbe().probeContentType(file), ""); } }
ReadFileService extends ServiceImp { private String probeContentType(File file) throws IOException { return defaultIfBlank(contentTypeProbe().probeContentType(file), ""); }  }
ReadFileService extends ServiceImp { private String probeContentType(File file) throws IOException { return defaultIfBlank(contentTypeProbe().probeContentType(file), ""); }  @Override void doService(final AdaptrisMessage message); @Override void prepare(); String getFilePath(); void setFilePath(final String filePath); String getContentTypeMetadataKey(); void setContentTypeMetadataKey(String contentTypeMetadataKey); ContentTypeProbe getContentTypeProbe(); void setContentTypeProbe(ContentTypeProbe contentTypeProbe); }
ReadFileService extends ServiceImp { private String probeContentType(File file) throws IOException { return defaultIfBlank(contentTypeProbe().probeContentType(file), ""); }  @Override void doService(final AdaptrisMessage message); @Override void prepare(); String getFilePath(); void setFilePath(final String filePath); String getContentTypeMetadataKey(); void setContentTypeMetadataKey(String contentTypeMetadataKey); ContentTypeProbe getContentTypeProbe(); void setContentTypeProbe(ContentTypeProbe contentTypeProbe);  }