use of com.adaptris.core.lms.FileBackedMessageFactory in project interlok by adaptris.
the class FilesystemRetryStoreTest method testBuildForRetry_FileBacked.
@Test
public void testBuildForRetry_FileBacked() throws Exception {
FilesystemRetryStore store = new FilesystemRetryStore().withBaseUrl(BaseCase.getConfiguration(TEST_BASE_URL));
try {
LifecycleHelper.initAndStart(store);
AdaptrisMessage msg = new DefaultMessageFactory().newMessage("hello");
store.write(msg);
Map<String, String> metadata = store.getMetadata(msg.getUniqueId());
AdaptrisMessage retry = store.buildForRetry(msg.getUniqueId(), store.getMetadata(msg.getUniqueId()), new FileBackedMessageFactory());
assertEquals(msg.getUniqueId(), retry.getUniqueId());
assertEquals(msg.getMessageHeaders(), retry.getMessageHeaders());
} finally {
LifecycleHelper.stopAndClose(store);
}
}
Aggregations