} catch (Exception e) {
}
client.deleteKeyPairInRegion(null, keyName);
KeyPair result = client.createKeyPairInRegion(null, keyName);
assertNotNull(result);
assertNotNull(result.getKeyMaterial());
assertNotNull(result.getSha1OfPrivateKey());
assertEquals(result.getKeyName(), keyName);
Set<KeyPair> twoResults = Sets.newLinkedHashSet(client.describeKeyPairsInRegion(null, keyName));
assertNotNull(twoResults);
assertEquals(twoResults.size(), 1);
KeyPair listPair = twoResults.iterator().next();
assertEquals(listPair.getKeyName(), result.getKeyName());
assertEquals(listPair.getSha1OfPrivateKey(), result.getSha1OfPrivateKey());
}