FinalMappings implements IFinalMapping { @Override synchronized public void add(Map<Integer, Integer> mapping) { mappings.add(mapping); } protected  FinalMappings(); synchronized static FinalMappings getInstance(); @Override synchronized void add(Map<Integer, Integer> mapping); @Override synchronized final void set(List<Map<Integer, Integer>> list); @Override synchronized Iterator<Map<Integer, Integer>> getIterator(); @Override synchronized void clear(); @Override synchronized List<Map<Integer, Integer>> getFinalMapping(); @Override synchronized int getSize();  }
@Test public void testAdd() { Map<Integer, Integer> mapping = new TreeMap<Integer, Integer>(); mapping.put(1, 1); mapping.put(2, 2); mapping.put(3, 3); FinalMappings instance = new FinalMappings(); instance.add(mapping); assertEquals(1, instance.getSize()); }