@Test
public void testResolveToHostNameShouldReturnUnknownHostNameWhenUnknownHostExceptionOccurs() throws UnknownHostException {

    //GIVEN
    String expectedHostName = "UNKNOWN HOST(anIPAddress)";
    given(inetAddressFactory.createByName("anIPAddress")).willThrow(new UnknownHostException());
    //WHEN
    String actualHostName = underTest.resolveToHostName("anIPAddress");
    //THEN
    assertEquals(expectedHostName, actualHostName);
}