public static String getWebServiceName(NetworkService networkService) {
    if (isWebService(networkService)
        && networkService.getServiceContext().getWebServiceContext().hasSoftware()) {
      return Ascii.toLowerCase(
          networkService.getServiceContext().getWebServiceContext().getSoftware().getName());
    }
    return Ascii.toLowerCase(networkService.getServiceName());
  }
@Test
  public void getWebServiceName_whenWebServiceWithSoftware_returnsWebServiceName() {
    assertThat(
            NetworkServiceUtils.getWebServiceName(
                NetworkService.newBuilder()
                    .setNetworkEndpoint(forIpAndPort("127.0.0.1", 8080))
                    .setServiceName("http")
                    .setServiceContext(
                        ServiceContext.newBuilder()
                            .setWebServiceContext(
                                WebServiceContext.newBuilder()
                                    .setSoftware(Software.newBuilder().setName("jenkins"))))
                    .build()))
        .isEqualTo("jenkins");
  }