### Question:
CredentialProviderToken extends PasswordToken { @Override public CredentialProviderToken clone() { CredentialProviderToken clone = (CredentialProviderToken) super.clone(); clone.setPassword(this.getPassword()); return clone; } CredentialProviderToken();  CredentialProviderToken(String name, String credentialProviders); String getName(); String getCredentialProviders(); @Override void init(Properties properties); @Override Set<TokenProperty> getProperties(); @Override CredentialProviderToken clone(); static final String NAME_PROPERTY; }### Answer:
@Test public void cloneReturnsCorrectObject() throws Exception { CredentialProviderToken token = new CredentialProviderToken("root.password", keystorePath); CredentialProviderToken clone = token.clone(); assertEquals(token, clone); assertArrayEquals(token.getPassword(), clone.getPassword()); }