### Question:
ProtoToGql { static String getReferenceName(GenericDescriptor descriptor) { return CharMatcher.anyOf(".").replaceFrom(descriptor.getFullName(), "_"); } private  ProtoToGql();   }### Answer:
@Test public void getReferenceNameShouldReturnCorrectValueForMessages() { assertThat(ProtoToGql.getReferenceName(Proto1.getDescriptor())) .isEqualTo("javatests_com_google_api_graphql_rejoiner_proto_Proto1"); assertThat(ProtoToGql.getReferenceName(Proto2.getDescriptor())) .isEqualTo("javatests_com_google_api_graphql_rejoiner_proto_Proto2"); }
@Test public void getReferenceNameShouldReturnCorrectValueForInnerMessages() { assertThat(ProtoToGql.getReferenceName(InnerProto.getDescriptor())) .isEqualTo("javatests_com_google_api_graphql_rejoiner_proto_Proto1_InnerProto"); }
@Test public void getReferenceNameShouldReturnCorrectValueForEnums() { assertThat(ProtoToGql.getReferenceName(TestEnum.getDescriptor())) .isEqualTo("javatests_com_google_api_graphql_rejoiner_proto_Proto2_TestEnum"); }