@Test
public void testIsAlreadyAllShards() {

    assertFalse(test.isAlreadyAllShards(set("1"), null));
    assertFalse(test.isAlreadyAllShards(set("1"), set()));
    
    try {
        test.isAlreadyAllShards(set("1"), set("2"));
        fail();
    } catch (Exception e) {
        assertEquals(IllegalStateException.class, e.getClass());
    }
    
    assertTrue(test.isAlreadyAllShards(set("1"), set("1")));
}