Code example for HashMap

Methods: getsize

0
        Child child2 = new ChildBuilder().withId("59cd40f39ab6aa791f73885e3bdd99f9").withName("tester").withUniqueId("1234abcd").withRev("4-b011946150a16b0d2c6271aed05e2abe").withCreatedBy("user1").build();
        repository.createOrUpdate(child1);
        repository.createOrUpdate(child2);
 
        HashMap<String, String> allIdsAndRevs = repository.getAllIdsAndRevs();
        assertEquals(2, allIdsAndRevs.size());
        assertEquals("", allIdsAndRevs.get(""));
        assertEquals("4-b011946150a16b0d2c6271aed05e2abe", allIdsAndRevs.get("59cd40f39ab6aa791f73885e3bdd99f9"));
 
        child1.put("_id", "dfb2031ebfcbef39dccdb468f5200edc");
        child1.put("_rev", "5-1ed26a0e5072830a9064361a570684f6");
        repository.update(child1);
 
        allIdsAndRevs = repository.getAllIdsAndRevs();
        assertEquals(2, allIdsAndRevs.size());
        assertEquals("4-b011946150a16b0d2c6271aed05e2abe", allIdsAndRevs.get("59cd40f39ab6aa791f73885e3bdd99f9"));
        assertEquals("5-1ed26a0e5072830a9064361a570684f6", allIdsAndRevs.get("dfb2031ebfcbef39dccdb468f5200edc"));
 
    }