### Question:
MapPoolDuplicateAction extends AbstractAction { @Override public void actionPerformed(ActionEvent e) { int idx = mapPoolJTable.getSelectedRow(); final Map map = mapPool.get(mapPoolJTable.convertRowIndexToModel(idx)); actionPerformed(map); } MapPoolDuplicateAction(MapPoolJTable mapPoolJTable); @Override void actionPerformed(ActionEvent e); Map actionPerformed(final Map map);  }### Answer:
@Test public void testDuplicateMap() throws AtlasException, FactoryException, TransformException, SAXException, IOException, ParserConfigurationException { AtlasConfigEditable ace = GpTestingUtil .getAtlasConfigE(TestAtlas.small); Map map1 = ace.getMapPool().get(0); File htmlDir1 = ace.getHtmlDirFor(map1); int count1 = htmlDir1.list().length; long size1 = FileUtils.sizeOfDirectory(htmlDir1); assertTrue("map html dir may not be empty for this test", count1 > 0); MapPoolDuplicateAction mapPoolDuplicateAction = new MapPoolDuplicateAction( new MapPoolJTable(ace)); if (TestingUtil.INTERACTIVE) { Map map2 = mapPoolDuplicateAction.actionPerformed(map1); assertFalse(map1.equals(map2)); File htmlDir2 = ace.getHtmlDirFor(map2); assertFalse(htmlDir1.equals(htmlDir2)); long size2 = FileUtils.sizeOfDirectory(htmlDir2); int count2 = htmlDir2.list().length; assertEquals(size1, size2); assertEquals(count1, count2); assertFalse("SVN files should have been omitted during copy", new File(htmlDir2, ".svn").exists()); FileUtils.deleteDirectory(htmlDir2); } ace.deleteAtlas(); }