use of com.adaptris.core.stubs.StubSerializableMessage in project interlok by adaptris.
the class WorkflowManagerTest method createSM.
private SerializableMessage createSM(String msgUniqueId) {
SerializableMessage msg = new StubSerializableMessage();
msg.setUniqueId(msgUniqueId);
msg.setContent(PAYLOAD);
msg.setContentEncoding(PAYLOAD_ENCODING);
msg.addMessageHeader(METADATA_KEY, METADATA_VALUE);
return msg;
}
use of com.adaptris.core.stubs.StubSerializableMessage in project interlok by adaptris.
the class SerializableAdaptrisMessageTest method testConstructors.
@Test
public void testConstructors() throws Exception {
SerializableAdaptrisMessage message = new SerializableAdaptrisMessage(testName.getMethodName());
assertEquals(testName.getMethodName(), message.getUniqueId());
assertEquals(0, message.getMetadata().size());
assertNull(message.getContent());
assertEquals("", message.getNextServiceId());
message = new SerializableAdaptrisMessage(testName.getMethodName(), "my payload");
assertEquals(testName.getMethodName(), message.getUniqueId());
assertEquals(0, message.getMetadata().size());
assertEquals("my payload", message.getContent());
assertEquals("", message.getNextServiceId());
SerializableMessage stub = new StubSerializableMessage();
stub.setUniqueId(testName.getMethodName());
stub.setContent("my payload");
message = new SerializableAdaptrisMessage(stub);
assertEquals(testName.getMethodName(), message.getUniqueId());
assertEquals(0, message.getMetadata().size());
assertEquals("my payload", message.getContent());
assertEquals("", message.getNextServiceId());
}
Aggregations