@Test public void testAssignPartitions() { List<List<ClusterNode>> nodes = Collections.singletonList(Collections.singletonList(mock(ClusterNode.class))); doReturn(nodes).when(affinityFunction).assignPartitions(any()); List<List<ClusterNode>> resNodes = wrapper.assignPartitions(mock(AffinityFunctionContext.class)); assertEquals(nodes, resNodes); verify(affinityFunction, times(1)).assignPartitions(any()); }
@Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx) { return delegate.assignPartitions(affCtx); }
DatasetAffinityFunctionWrapper implements AffinityFunction { @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx) { return delegate.assignPartitions(affCtx); } }
DatasetAffinityFunctionWrapper implements AffinityFunction { @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx) { return delegate.assignPartitions(affCtx); } DatasetAffinityFunctionWrapper(AffinityFunction delegate); }
DatasetAffinityFunctionWrapper implements AffinityFunction { @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx) { return delegate.assignPartitions(affCtx); } DatasetAffinityFunctionWrapper(AffinityFunction delegate); @Override void reset(); @Override int partitions(); @Override int partition(Object key); @Override List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx); @Override void removeNode(UUID nodeId); }
DatasetAffinityFunctionWrapper implements AffinityFunction { @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx) { return delegate.assignPartitions(affCtx); } DatasetAffinityFunctionWrapper(AffinityFunction delegate); @Override void reset(); @Override int partitions(); @Override int partition(Object key); @Override List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx); @Override void removeNode(UUID nodeId);  }