Java 类javax.management.relation.RoleUnresolvedList 实例源码

项目:deep-spark    文件:CellValidatorTest.java   
public void testObjectToKind() {
    assertEquals(Kind.objectToKind(null), Kind.NOT_A_COLLECTION);

    /* let's try with some set implementation */
    assertEquals(Kind.objectToKind(new HashSet()), Kind.SET);
    assertEquals(Kind.objectToKind(new CopyOnWriteArraySet()), Kind.SET);
    assertEquals(Kind.objectToKind(new ConcurrentSkipListSet()), Kind.SET);
    assertEquals(Kind.objectToKind(new LinkedHashSet()), Kind.SET);
    assertEquals(Kind.objectToKind(new TreeSet()), Kind.SET);

    /* let's try with some list implementation */
    assertEquals(Kind.objectToKind(new ArrayList()), Kind.LIST);
    assertEquals(Kind.objectToKind(new CopyOnWriteArrayList<>()), Kind.LIST);
    assertEquals(Kind.objectToKind(new LinkedList<>()), Kind.LIST);
    assertEquals(Kind.objectToKind(new RoleList()), Kind.LIST);
    assertEquals(Kind.objectToKind(new RoleUnresolvedList()), Kind.LIST);
    assertEquals(Kind.objectToKind(new Stack()), Kind.LIST);
    assertEquals(Kind.objectToKind(new Vector<>()), Kind.LIST);

    /* let's try with some map implementation */
    assertEquals(Kind.objectToKind(new HashMap()), Kind.MAP);
    assertEquals(Kind.objectToKind(new ConcurrentHashMap<>()), Kind.MAP);
    assertEquals(Kind.objectToKind(new ConcurrentSkipListMap<>()), Kind.MAP);
    assertEquals(Kind.objectToKind(new Hashtable<>()), Kind.MAP);
    assertEquals(Kind.objectToKind(new IdentityHashMap<>()), Kind.MAP);
    assertEquals(Kind.objectToKind(new LinkedHashMap<>()), Kind.MAP);
    assertEquals(Kind.objectToKind(new PrinterStateReasons()), Kind.MAP);
    assertEquals(Kind.objectToKind(new Properties()), Kind.MAP);
    assertEquals(Kind.objectToKind(new TreeMap<>()), Kind.MAP);
    assertEquals(Kind.objectToKind(new WeakHashMap<>()), Kind.MAP);
}