@Test public void testService() throws Exception { final AdaptrisMessage message = AdaptrisMessageFactory.getDefaultInstance().newMessage(); final ReadFileService service = new ReadFileService(); service.setFilePath(FILE); execute(service, message); final byte[] actual = message.getPayload(); final File file = new File(FILE); final byte[] expected = new byte[(int) file.length()]; try (final FileInputStream fir = new FileInputStream(file)) { fir.read(expected); } assertArrayEquals(expected, actual); }
public void setFilePath(final String filePath) { this.filePath = Args.notBlank(filePath, "filePath"); }
ReadFileService extends ServiceImp { public void setFilePath(final String filePath) { this.filePath = Args.notBlank(filePath, "filePath"); } }
ReadFileService extends ServiceImp { public void setFilePath(final String filePath) { this.filePath = Args.notBlank(filePath, "filePath"); }  }
ReadFileService extends ServiceImp { public void setFilePath(final String filePath) { this.filePath = Args.notBlank(filePath, "filePath"); }  @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 { public void setFilePath(final String filePath) { this.filePath = Args.notBlank(filePath, "filePath"); }  @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);  }