### Question:
HankApiHelper { protected DomainData getDomainData(Domain domain) throws IOException { DomainData data = new DomainData(); data.name = domain.getName(); data.numPartitions = domain.getNumParts(); data.storageEngine = domain.getStorageEngineFactoryClassName(); data.storageEngineOptions = domain.getStorageEngineOptions(); Map<Integer, DomainVersionData> versionsMap = new HashMap<Integer, DomainVersionData>(); for (DomainVersion v : domain.getVersions()) { versionsMap.put(v.getVersionNumber(), getDomainVersionData(v)); } data.versionsMap = versionsMap; return data; } HankApiHelper(Coordinator coordinator); DomainData getDomainData(String domainName);  }### Answer:
@Test public void testGetDomainData() throws IOException { HankApiHelper.DomainData data = helper.getDomainData(coordinator.getDomain(ZkMockCoordinatorTestCase.DOMAIN_0)); assertEquals(ZkMockCoordinatorTestCase.DOMAIN_0, data.name); assertEquals(32, data.numPartitions); assertEquals(2, data.versionsMap.size()); HankApiHelper.DomainVersionData versionData = data.versionsMap.get(0); assertNotNull(versionData); assertEquals(0, versionData.versionNumber); assertEquals(true, versionData.isClosed); versionData = data.versionsMap.get(1); assertNotNull(versionData); assertEquals(1, versionData.versionNumber); assertEquals(false, versionData.isClosed); versionData = data.versionsMap.get(2); assertNull(versionData); }