use of com.adaptris.core.MultiPayloadAdaptrisMessageImp in project interlok by adaptris.
the class MultiPayloadMessageSplitterTest method testNonCloneableMessage.
@Test
@SuppressWarnings("serial")
public void testNonCloneableMessage() {
List<AdaptrisMessage> response = (List<AdaptrisMessage>) splitter.splitMessage(new MultiPayloadAdaptrisMessageImp("bacon", new GuidGenerator(), DefaultMessageFactory.getDefaultInstance(), PAYLOAD_1.getBytes()) {
@Override
public MessageLifecycleEvent getMessageLifecycleEvent() {
return new MessageLifecycleEvent() {
@Override
public List<MleMarker> getMleMarkers() {
List<MleMarker> list = new ArrayList<>();
list.add(new MleMarker() {
@Override
public Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}
});
return list;
}
};
}
});
assertEquals(0, response.size());
}
use of com.adaptris.core.MultiPayloadAdaptrisMessageImp in project interlok by adaptris.
the class ForEachTest method testNonCloneableMessage.
@Test
@SuppressWarnings("serial")
public void testNonCloneableMessage() throws Exception {
forEach.doService(new MultiPayloadAdaptrisMessageImp("bacon", new GuidGenerator(), DefaultMessageFactory.getDefaultInstance(), PAYLOAD_1) {
@Override
public MessageLifecycleEvent getMessageLifecycleEvent() {
return new MessageLifecycleEvent() {
@Override
public List<MleMarker> getMleMarkers() {
List<MleMarker> list = new ArrayList<>();
list.add(new MleMarker() {
@Override
public Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}
});
return list;
}
};
}
});
verify(mock, never()).doService(any(AdaptrisMessage.class));
}
Aggregations