> + public void testCreateKey() throws IOException {
> + String publicKey =
> Strings2.toStringAndClose(getClass().getResourceAsStream("/ssh-rsa.txt"));
> + key = api.getKeyPairApi().create("foo", publicKey);
> +
> + assertNotNull(key);
> + assertNotNull(key.getId());
> + assertEquals(key.getName(), "foo");
> + assertNotNull(key.getPublicKey());
> + assertEquals(key.getPublicKey().getAlgorithm(), "RSA");
> + }
> +
> + @Test(dependsOnMethods = "testCreateKey")
> + public void testListKeys() {
> + List<SshKey> keys = api.getKeyPairApi().list();
> +
> + assertTrue(keys.size() > 0, "SSH key list should not be empty");
`!keys.isEmpty()`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9166707