MetricsHelper { static String getHost() { try { return InetAddress.getLocalHost().toString(); } catch (UnknownHostException e) { logger.warn(e); } return HOST_UNKNOWN; } private  MetricsHelper(); static void config(VertxOptions vertxOptions, String influxUrl,
      String influxDbName, String influxUserName, String influxPassword); static Sample getTimerSample(); static Timer recordHttpServerProcessingTime(Sample sample, String tenant,
      int httpStatusCode, String httpMethod, ModuleInstance moduleInstance); static Timer recordHttpClientResponse(Sample sample, String tenant, int httpStatusCode,
      String httpMethod, ModuleInstance moduleInstance); static Counter recordHttpClientError(String tenant, String httpMethod, String urlPath); static boolean isEnabled(); static void setEnabled(boolean enabled);  }
@Test void testGetHost() { assertNotEquals(MetricsHelper.HOST_UNKNOWN, MetricsHelper.getHost()); try (MockedStatic<InetAddress> mocked = Mockito.mockStatic(InetAddress.class)) { mocked.when(InetAddress::getLocalHost).thenThrow(UnknownHostException.class); assertEquals(MetricsHelper.HOST_UNKNOWN, MetricsHelper.getHost()); } }