### Question:
TorConfig { public File getCookieAuthFile() { return cookieAuthFile; }  static TorConfig createDefault(File configDir); static TorConfig createFlatConfig(File configDir); static TorConfig createConfig(File installDir, File configDir, File dataDir); File getInstallDir(); File getHiddenServiceDir(); File getConfigDir(); File getHomeDir(); File getHostnameFile(); File getLibraryPath(); File getDataDir(); File getGeoIpFile(); File getGeoIpv6File(); File getTorrcFile(); File getResolveConf(); File getControlPortFile(); File resolveTorrcFile(); File getTorExecutableFile(); File getCookieAuthFile(); int getFileCreationTimeout(); @Override String toString(); final static String GEO_IP_NAME; final static String GEO_IPV_6_NAME; final static String TORRC_NAME; }### Answer:
@Test public void defaultCookie() { TorConfig config = new TorConfig.Builder(sampleFile, sampleFile).build(); assertEquals(new File(sampleFile, "lib/tor/control_auth_cookie").getPath(), config.getCookieAuthFile().getPath()); }
@Test public void defaultCookieWithDataDir() { File dataDir = new File("sample/datadir"); TorConfig config = new TorConfig.Builder(sampleFile, sampleFile).dataDir(dataDir).build(); assertEquals(new File(dataDir, "control_auth_cookie").getPath(), config.getCookieAuthFile().getPath()); }