@Test(groups = "unit") public void should_return_query_plan_of_wrapped_policy() { when(wrappedPolicy.newQueryPlan(any(String.class), any(Statement.class))) .thenReturn(Iterators.forArray(host1, host2, host3)); HostFilterPolicy policy = new HostFilterPolicy(wrappedPolicy, null); assertThat(policy.newQueryPlan("keyspace", mock(Statement.class))) .containsExactly(host1, host2, host3); }
@Test(groups = "unit") public void should_return_query_plan_of_wrapped_policy() { when(wrappedPolicy.newQueryPlan(any(String.class), any(Statement.class))) .thenReturn(Iterators.forArray(host1, host2, host3)); HostFilterPolicy policy = new HostFilterPolicy(wrappedPolicy, null); assertThat(policy.newQueryPlan("keyspace", mock(Statement.class))) .containsExactly(host1, host2, host3); }