verifyNoMoreInteractions(replicator);
}
@Test
public void testGetFlushAgents() throws Exception {
final Agent agent1 = mock(Agent.class);
final Agent agent2 = mock(Agent.class);
final AgentConfig agentConfig1 = mock(AgentConfig.class);
final AgentConfig agentConfig2 = mock(AgentConfig.class);
@SuppressWarnings("unchecked")
final Map<String, Agent> agents = mock(Map.class);
final Collection<Agent> agentValues = Arrays.asList(new Agent[]{ agent1, agent2 });
when(agentManager.getAgents()).thenReturn(agents);
when(agents.values()).thenReturn(agentValues);
when(agent1.getId()).thenReturn("Agent 1");
when(agent1.isEnabled()).thenReturn(true);
when(agent1.getConfiguration()).thenReturn(agentConfig1);
when(agent2.getId()).thenReturn("Agent 2");
when(agent2.isEnabled()).thenReturn(true);
when(agent2.getConfiguration()).thenReturn(agentConfig2);
when(agentConfig1.getSerializationType()).thenReturn("flush");
when(agentConfig2.getSerializationType()).thenReturn("notflush");
when(agentConfig1.getTransportURI()).thenReturn("http://localhost/dispatcher/invalidate.cache");