public static String getServiceName(NetworkService networkService) {
    if (isWebService(networkService) && networkService.hasSoftware()) {
      return Ascii.toLowerCase(networkService.getSoftware().getName());
    }
    return Ascii.toLowerCase(networkService.getServiceName());
  }
@Test
  public void getServiceName_whenWebServiceNoSoftware_returnsServiceName() {
    assertThat(
        NetworkServiceUtils.getServiceName(
            NetworkService.newBuilder()
                .setNetworkEndpoint(forIpAndPort("127.0.0.1", 22))
                .setServiceName("http")
                .build()))
        .isEqualTo("http");
  }