public static NamingSelector newClusterSelector(Collection<String> clusters) {
        if (CollectionUtils.isNotEmpty(clusters)) {
            final Set<String> set = new HashSet<>(clusters);
            Predicate<Instance> filter = instance -> set.contains(instance.getClusterName());
            String clusterString = getUniqueClusterString(clusters);
            return new ClusterSelector(filter, clusterString);
        } else {
            return EMPTY_SELECTOR;
        }
    }
@Test
    public void testNewClusterSelector1() {
        Instance ins1 = new Instance();
        ins1.setClusterName("a");
        Instance ins2 = new Instance();
        ins2.setClusterName("b");
        Instance ins3 = new Instance();
        ins3.setClusterName("c");
        
        NamingContext namingContext = mock(NamingContext.class);
        when(namingContext.getInstances()).thenReturn(Arrays.asList(ins1, ins2, ins3));
        
        NamingSelector namingSelector1 = NamingSelectorFactory.newClusterSelector(Collections.singletonList("a"));
        NamingResult result1 = namingSelector1.select(namingContext);
        assertEquals("a", result1.getResult().get(0).getClusterName());
        
        NamingSelector namingSelector2 = NamingSelectorFactory.newClusterSelector(Collections.emptyList());
        NamingResult result2 = namingSelector2.select(namingContext);
        assertEquals(3, result2.getResult().size());
    }