ReplicaMap { void addAll(ReplicaMap other) { map.putAll(other.map); } ReplicaMap(AutoCloseableLock readLock, AutoCloseableLock writeLock);   ReplicaMap(ReadWriteLock lock);   }
@Test public void testAddAll() { ReplicaMap temReplicaMap = new ReplicaMap(new ReentrantReadWriteLock()); Block tmpBlock = new Block(5678, 5678, 5678); temReplicaMap.add(bpid, new FinalizedReplica(tmpBlock, null, null)); map.addAll(temReplicaMap); assertNull(map.get(bpid, 1234)); assertNotNull(map.get(bpid, 5678)); }