@Test
public void testCreate() {

    MessageFactory[] factories = {new TestMessageFactoryPovider(), new TestMessageFactory()};
    IgniteMessageFactoryImpl msgFactory = new IgniteMessageFactoryImpl(factories);
    Message msg;
    msg = msgFactory.create(TEST_MSG_1_TYPE);
    assertTrue(msg instanceof TestMessage1);
    msg = msgFactory.create(TEST_MSG_2_TYPE);
    assertTrue(msg instanceof TestMessage2);
    msg = msgFactory.create(TEST_MSG_42_TYPE);
    assertTrue(msg instanceof TestMessage42);
    short[] directTypes = msgFactory.registeredDirectTypes();
    assertArrayEquals(directTypes, new short[] {TEST_MSG_1_TYPE, TEST_MSG_2_TYPE, TEST_MSG_42_TYPE});
}