BusProtoStuffMessageConverter extends AbstractMessageConverter { @Override protected Object convertToInternal(final Object payload, final MessageHeaders headers, final Object conversionHint) { final byte[] clazzHeader = writeClassHeader(payload.getClass()); final byte[] writeContent = writeContent(payload); return mergeClassHeaderAndContent(clazzHeader, writeContent); } BusProtoStuffMessageConverter(); @Override Object convertFromInternal(final Message<?> message, final Class<?> targetClass,
            final Object conversionHint); static final MimeType APPLICATION_BINARY_PROTOSTUFF; }
@Test @Description("Verifies that a MessageConversationException is thrown on missing event-type information encoding") public void missingEventTypeMappingThrowsMessageConversationException() { final DummyRemoteEntityEvent dummyEvent = new DummyRemoteEntityEvent(targetMock, "applicationId"); try { underTest.convertToInternal(dummyEvent, new MessageHeaders(new HashMap<>()), null); Assertions.fail("Missing MessageConversationException for un-defined event-type"); } catch (final MessageConversionException e) { } }