public static Endpoints.ApiServiceDescriptor parseApiServiceDescriptorFromText(
      String descriptorText) throws TextFormat.ParseException {
    Endpoints.ApiServiceDescriptor.Builder apiServiceDescriptorBuilder =
        Endpoints.ApiServiceDescriptor.newBuilder();
    TextFormat.merge(descriptorText, apiServiceDescriptorBuilder);
    return apiServiceDescriptorBuilder.build();
  }
@Test
  public void testParseDescriptor() throws TextFormat.ParseException {
    Endpoints.ApiServiceDescriptor descriptor =
        Endpoints.ApiServiceDescriptor.newBuilder().setUrl("some_test_url").build();
    Endpoints.ApiServiceDescriptor decoded =
        DataflowWorkerHarnessHelper.parseApiServiceDescriptorFromText(descriptor.toString());

    assertThat(decoded, equalTo(descriptor));
    assertThat(decoded.getUrl(), equalTo("some_test_url"));
  }