private static MethodDescriptor.MethodType getMethodType(final MethodDescriptor.MethodType methodType) {
        MethodDescriptor.MethodType grpcMethodType;

        switch (methodType) {
            case UNARY:
                grpcMethodType = MethodDescriptor.MethodType.UNARY;
                break;
            case CLIENT_STREAMING:
                grpcMethodType = MethodDescriptor.MethodType.CLIENT_STREAMING;
                break;
            case SERVER_STREAMING:
                grpcMethodType = MethodDescriptor.MethodType.SERVER_STREAMING;
                break;
            case BIDI_STREAMING:
                grpcMethodType = MethodDescriptor.MethodType.BIDI_STREAMING;
                break;
            default:
                grpcMethodType = MethodDescriptor.MethodType.UNKNOWN;
        }
        
        return grpcMethodType;
    }
@Test
    public void getMethodTypeTest() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        final Method getMethodType = JsonMessage.class.getDeclaredMethod("getMethodType", MethodDescriptor.MethodType.class);
        getMethodType.setAccessible(true);
        assertEquals(MethodDescriptor.MethodType.UNARY, getMethodType.invoke(null, MethodDescriptor.MethodType.UNARY));
        assertEquals(MethodDescriptor.MethodType.CLIENT_STREAMING, getMethodType.invoke(null, MethodDescriptor.MethodType.CLIENT_STREAMING));
        assertEquals(MethodDescriptor.MethodType.SERVER_STREAMING, getMethodType.invoke(null, MethodDescriptor.MethodType.SERVER_STREAMING));
        assertEquals(MethodDescriptor.MethodType.BIDI_STREAMING, getMethodType.invoke(null, MethodDescriptor.MethodType.BIDI_STREAMING));
        assertEquals(MethodDescriptor.MethodType.UNKNOWN, getMethodType.invoke(null, MethodDescriptor.MethodType.UNKNOWN));
    }