use of org.neo4j.causalclustering.load_balancing.LoadBalancingPlugin in project neo4j by neo4j.
the class GetServersProcedureV2Test method shouldPassClientContextToPlugin.
@Test
public void shouldPassClientContextToPlugin() throws Exception {
// given
LoadBalancingPlugin plugin = mock(LoadBalancingPlugin.class);
when(plugin.run(anyMap())).thenReturn(mock(LoadBalancingPlugin.Result.class));
GetServersProcedureForMultiDC getServers = new GetServersProcedureForMultiDC(plugin);
Map<String, String> clientContext = stringMap("key", "value", "key2", "value2");
// when
getServers.apply(null, new Object[] { clientContext });
// then
verify(plugin).run(clientContext);
}
Aggregations