private EncoderMetadataSet metadatas;
private EncoderFactory factory;
private void assertMetadataFor(Class<?> type, Class<? extends Encoder> expectedEncoderClass, MessageType expectedType)
{
EncoderMetadata metadata = factory.getMetadataFor(type);
Assert.assertEquals("metadata.coderClass",metadata.getCoderClass(),expectedEncoderClass);
Assert.assertThat("metadata.messageType",metadata.getMessageType(),is(expectedType));
Assert.assertEquals("metadata.objectType",metadata.getObjectType(),type);
}