UserCredentialVersion extends CredentialVersion { @Override public String getCredentialType() { return delegate.getCredentialType(); } UserCredentialVersion(final UserCredentialVersionData delegate);  UserCredentialVersion(final String name);  UserCredentialVersion(
    final UserCredentialValue userValue,
    final String name,
    final StringGenerationParameters generationParameters,
    final Encryptor encryptor
  ); @Override String getCredentialType(); @Override void rotate(); String getPassword(); void setPassword(final String password); String getUsername(); void setUsername(final String username); String getSalt(); void setSalt(final String salt); @Override StringGenerationParameters getGenerationParameters(); void setGenerationParameters(final StringGenerationParameters generationParameters); @Override boolean matchesGenerationParameters(final GenerationParameters generationParameters);  }
@Test public void getCredentialType_returnsUser() { subject = new UserCredentialVersion("test cred"); assertThat(subject.getCredentialType(), equalTo("user")); }