### Question:
UserConfig extends AbstractConfig { public synchronized boolean hasRootPath() { return getProperty(PROPERTY_ROOTPATH) != null && !getProperty(PROPERTY_ROOTPATH).isEmpty(); } UserConfig(final Path file); synchronized Path getRootPath(); synchronized boolean hasRootPath(); synchronized void setRootPath(final Path path); synchronized String getUsername(); synchronized boolean hasUsername(); synchronized void setUsername(final String username); synchronized String getPassword(); synchronized boolean hasPassword(); synchronized void setPassword(final String password); synchronized String getPin(); synchronized boolean hasPin(); synchronized void setPin(final String pin); synchronized boolean isAutoLoginEnabled(); synchronized void setAutoLogin(boolean enabled);  }### Answer:
@Test public void testHasRootPath() throws IOException { userConfig.setRootPath(Paths.get("")); assertFalse(userConfig.hasRootPath()); if (!OsUtils.isWindows()) { userConfig.setRootPath(Paths.get(" ")); assertTrue(userConfig.hasRootPath()); } userConfig.setRootPath(Paths.get("/this/is/a/path")); assertTrue(userConfig.hasRootPath()); userConfig.setRootPath(null); assertFalse(userConfig.hasRootPath()); }