@SuppressWarnings("unchecked")
    public static <T extends Message> T newMessageByJavaClassName(final String className, final byte[] bs) {
        final MethodHandle handle = PARSE_METHODS_4J.get(className);
        if (handle == null) {
            throw new MessageClassNotFoundException(className + " not found");
        }
        try {
            return (T) handle.invoke(bs);
        } catch (Throwable t) {
            throw new SerializationException(t);
        }
    }
@Test
    public void testNewMessageByJavaClassName() {
        SnapshotMeta meta = SnapshotMeta.newBuilder().setLastIncludedIndex(99).setLastIncludedTerm(1).build();
        SnapshotMeta pMeta = ProtobufMsgFactory
            .newMessageByJavaClassName(meta.getClass().getName(), meta.toByteArray());
        assertNotNull(pMeta);
        assertNotSame(pMeta, meta);
        assertEquals(pMeta, meta);
    }