@Test(expected = IllegalStateException.class)
public void testReadOnly() {

    MessageFactory[] factories = {new TestMessageFactoryPovider(), new TestMessageFactory()};
    IgniteMessageFactory msgFactory = new IgniteMessageFactoryImpl(factories);
    msgFactory.register((short)0, () -> null);
}