@Test
public void testGetterUsesFirstResolver() {

    AdvancedHostResolver firstResolver = mock(AdvancedHostResolver.class);
    AdvancedHostResolver secondResolver = mock(AdvancedHostResolver.class);
    ChainedHostResolver chainResolver = new ChainedHostResolver(ImmutableList.of(firstResolver, secondResolver));
    when(firstResolver.getOriginalHostnames("one")).thenReturn(ImmutableList.of("originalOne"));
    Collection<String> results = chainResolver.getOriginalHostnames("one");
    assertNotNull("Resolver should not return null results", results);
    assertThat("Expected resolver to return a result", results, not(empty()));
    assertEquals("Resolver returned unexpected result", "originalOne", Iterables.get(results, 0));
    verify(secondResolver, never()).getOriginalHostnames(any(String.class));
}