public static Message toProto(final Map<?, ?> inputData, final Message defaultInstance) {
        ObjectHelper.notNull(inputData, "inputData");
        ObjectHelper.notNull(defaultInstance, "defaultInstance");

        final Descriptor descriptor = defaultInstance.getDescriptorForType();
        final Builder target = defaultInstance.newBuilderForType();

        return convertMapToMessage(descriptor, target, inputData);
    }
@Test
    public void testIfThrowsErrorInCaseNestedMessageNotMap() {
        final Map<String, Object> input = new HashMap<>();

        input.put("name", "Martin");
        input.put("id", 1234);
        input.put("address", "wrong address");

        final AddressBookProtos.Person defaultInstance = AddressBookProtos.Person.getDefaultInstance();
        assertThrows(IllegalArgumentException.class,
                () -> ProtobufConverter.toProto(input, defaultInstance));
    }