@Test public void resolved_hostname_is_not_empty_or_null() { String hostname = builderToTest.buildHostname(); assertNotNull(hostname); assertFalse(hostname.isEmpty()); }
public String buildHostname() { try { return InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { return "localhost"; } }
HostnameBuilder { public String buildHostname() { try { return InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { return "localhost"; } } }
HostnameBuilder { public String buildHostname() { try { return InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { return "localhost"; } }  }
HostnameBuilder { public String buildHostname() { try { return InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { return "localhost"; } }  String buildHostname(); }
HostnameBuilder { public String buildHostname() { try { return InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { return "localhost"; } }  String buildHostname();  }