### Question:
UserConfig extends AbstractConfig { public synchronized boolean hasPin() { return getPin() != null && !getPin().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 testHasPin() throws IOException { userConfig.setPin(""); assertFalse(userConfig.hasPin()); userConfig.setPin(" "); assertTrue(userConfig.hasPin()); userConfig.setPin("myOwnPin"); assertTrue(userConfig.hasPin()); userConfig.setPin(null); assertFalse(userConfig.hasPin()); }