@Test
public void testFindAgentInstances() {

    List<AgentInstanceGroup> serverGroups = service.getInstanceGroups();
    assertThat(serverGroups).hasSize(2);
    String serverGroupId0 = serverGroups.get(0).getId();
    List<Pair<AgentInstanceGroup, List<AgentInstance>>> result = service.findAgentInstances(pair -> pair.getLeft().getId().equals(serverGroupId0));
    assertThat(result).hasSize(1);
    assertThat(result.get(0).getLeft().getId()).isEqualTo(serverGroups.get(0).getId());
}