public static String getLocalHostAddress() {
        if (useFqdn) {
            return localAddr.getCanonicalHostName();
        }
        return InetAddresses.toAddrString(localAddr);
    }
@Test
    public void enableFQDNTest() throws UnknownHostException,
                                        NoSuchFieldException,
                                        SecurityException,
                                        IllegalArgumentException,
                                        IllegalAccessException {
        mockNet();
        Field field = FrontendOptions.class.getDeclaredField("localAddr");
        field.setAccessible(true);
        field.set(null, addr);
        Field field1 = FrontendOptions.class.getDeclaredField("useFqdn");
        field1.setAccessible(true);

        field1.set(null, true);
        Assert.assertTrue(FrontendOptions.getLocalHostAddress().equals("sandbox"));
        field1.set(null, false);
        Assert.assertTrue(FrontendOptions.getLocalHostAddress().equals("127.0.0.10"));
    }