@Test
public void generateCredential_shouldUseTheProvidedSSHComment() throws Exception {

  final SshGenerationParameters sshGenerationParameters = new SshGenerationParameters();
  sshGenerationParameters.setSshComment("this is an ssh comment");
  final SshCredentialValue ssh = subject.generateCredential(sshGenerationParameters);
  final String expectedPublicKey = CertificateFormatter.derOf((RSAPublicKey) keyPair.getPublic())
    + " this is an ssh comment";
  assertThat(ssh.getPublicKey(), equalTo(expectedPublicKey));
}