@Test(expected = RuntimeException.class)
public void getKeyLength_whenPublicKeyIsInvalid_throwsException() {

  final RsaCredentialVersionData rsaCredentialData = new RsaCredentialVersionData("testRsa");
  final String publicKey = "This is a key that is obviously incorrect. Is it not?";
  rsaCredentialData.setPublicKey(publicKey);
  final RsaCredentialHelper rsaHelper = new RsaCredentialHelper(rsaCredentialData);
  rsaHelper.getKeyLength();
}