### Question:
QueryResponseToProto { public static <T extends Message> T buildMessage(T message, Map<String, Object> fields) { @SuppressWarnings("unchecked") T populatedMessage = (T) buildMessage(message.toBuilder(), fields); return populatedMessage; } private  QueryResponseToProto(); static T buildMessage(T message, Map<String, Object> fields);  }### Answer:
@Test public void getReferenceNameShouldReturnCorrectValueForMessages() { ProtoTruth.assertThat( QueryResponseToProto.buildMessage( TestProto.Proto1.getDefaultInstance(), ImmutableMap.of( "id", "abc", "intField", 123, "testProto", ImmutableMap.of("innerId", "abc_inner", "enums", ImmutableList.of("FOO"))))) .isEqualTo( Proto1.newBuilder() .setId("abc") .setIntField(123) .setTestProto( Proto2.newBuilder() .setInnerId("abc_inner") .addEnumsValue(Proto2.TestEnum.FOO_VALUE)) .build()); }