### Question:
DSAKeys { public static String fingerprintPublicKey(String publicKeyOpenSSH) { DSAPublicKeySpec publicKeySpec = publicKeySpecFromOpenSSH(publicKeyOpenSSH); return fingerprint(publicKeySpec.getP(), publicKeySpec.getQ(), publicKeySpec.getG(), publicKeySpec.getY()); }  static String encodeAsOpenSSH(DSAPublicKey key); static DSAPublicKeySpec publicKeySpecFromOpenSSH(String idDsaPub); static DSAPublicKeySpec publicKeySpecFromOpenSSH(ByteSource supplier); static String fingerprintPublicKey(String publicKeyOpenSSH); static String fingerprint(BigInteger p, BigInteger q, BigInteger g, BigInteger y);  }### Answer:
@Test public void testCanReadRsaAndCompareFingerprintOnPublicRSAKey() throws IOException { String dsa = Strings2.toStringAndClose(getClass().getResourceAsStream("/ssh-dsa.pub")); String fingerPrint = DSAKeys.fingerprintPublicKey(dsa); assertEquals(fingerPrint, expectedFingerPrint); }