KeyStoreSecretProvider implements SecretProvider { public boolean setUsername(final String username) { return this.set(ALIAS_USERNAME, () -> username.toCharArray()); } KeyStoreSecretProvider(final KeyStoreHandler ksh); @Override char[] getPassword(); @Override String getUsername(); @Override Optional<ZonkyApiToken> getToken(); @Override boolean setToken(ZonkyApiToken apiToken); boolean setPassword(final char[] password); boolean setUsername(final String username); @Override boolean isPersistent();  }
@Test void setNullPassword() { final KeyStoreSecretProvider p = newProvider(USR, PWD); assertThat(p.setUsername(null)).isFalse(); }