@Test
public void testLoadSecretsMap() throws Exception {

  SecretsSerializer serializer = new KeyStoreSecretsSerializer(conf);
  Map<String, Secrets> secretsMap = new HashMap<String, Secrets>();
  serializer.loadSecretsMap(secretsMap);
  Secrets secrets = secretsMap.get(KEY_ALIAS);
  SecretKey loadSecretKey = secrets.getSecretKey();
  PrivateKey loadPrivateKey = secrets.getPrivateKey();
  
  assertEquals(new String(loadSecretKey.getEncoded(), 0, loadSecretKey.getEncoded().length), 
      new String(secretKey.getEncoded(), 0, secretKey.getEncoded().length));
  assertEquals(new String(loadPrivateKey.getEncoded(), 0, loadPrivateKey.getEncoded().length), 
      new String(privateKey.getEncoded(), 0, privateKey.getEncoded().length));
}