@Test
public void getAddressesNullKey() {

    jndiAdressProvider.setJndiKey(null);
    List<InetSocketAddress> result = jndiAdressProvider.getAddresses();
    assertNotNull(result);
    assertEquals(1, result.size());
    assertEquals("127.0.0.1", result.get(0).getAddress().getHostAddress());
    assertEquals(11211, result.get(0).getPort());
    jndiAdressProvider = new JndiAddressProvider(null, "127.0.0.1:11211");
    result = jndiAdressProvider.getAddresses();
    assertNotNull(result);
    assertEquals(1, result.size());
    assertEquals("127.0.0.1", result.get(0).getAddress().getHostAddress());
    assertEquals(11211, result.get(0).getPort());
}