### Question:
KeyStoreManager { public Key getIdentifierKey(String keyAlias) throws GeneralSecurityException, IOException { KeyPairGenerator keyPairGenerator = null; KeyStore keyStore = getKeyStore(); if (!keyStore.containsAlias(keyAlias)) { keyPairGenerator = KeyPairGenerator.getInstance("RSA", ANDROID_KEYSTORE); keyPairGenerator.initialize(getSpec(keyAlias)); return keyPairGenerator.generateKeyPair().getPublic(); } else { return keyStore.getCertificate(keyAlias).getPublicKey(); } } @Builder  KeyStoreManager(@NonNull Context context); Key getIdentifierKey(String keyAlias);  }### Answer:
@Test public void testIdentifierKey() throws Exception { String identifier = new String(keyStoreManager.getIdentifierKey("test").getEncoded()); Assert.assertEquals("public key", identifier); }