### Question:
PropertiesReader { public String getTransactionLogDir() { if (prop.containsKey("dataLogDir")) { return prop.getProperty("dataLogDir") + "/version-2"; } else if (prop.containsKey("dataDir")) { return prop.getProperty("dataDir") + "/version-2"; } else { return null; } } PropertiesReader(File propertiesFile); String getTransactionLogDir(); String getSnapshotDir(); File getPropertiesFile();  }### Answer:
@Test public void getTransactionLogDirTest() { try { PropertiesReader reader1 = new PropertiesReader(prop1); assertTrue(reader1.getTransactionLogDir().contentEquals("/home/zookeeper/datadir/version-2")); PropertiesReader reader2 = new PropertiesReader(prop2); assertTrue(reader2.getTransactionLogDir().contentEquals("/home/zookeeper/txnlogdir/version-2")); } catch (IOException e) { fail(); } }