public String getHostname() {
        return hostNameSupplier.getHostName();
    }
@Test
    void testGetHostname1() {
        try {
            InetAddress address = mock(InetAddress.class);
            when(address.getCanonicalHostName()).thenReturn("worker10");
            when(address.getHostName()).thenReturn("worker10");
            when(address.getHostAddress()).thenReturn("127.0.0.1");

            TaskManagerLocation info =
                    new TaskManagerLocation(ResourceID.generate(), address, 19871);
            assertThat("worker10").isEqualTo(info.getHostname());
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }