@Test
public void uploadSSHPublicKeyAndCreate() throws KaramelException {

  String keypairName = "pepeKeyPair";
  KeyPair pair = mock(KeyPair.class);
  List<KeyPair> keyPairList = new ArrayList<>();
  FluentIterable<KeyPair> keys = FluentIterable.from(keyPairList);
  when(keyPairApi.list()).thenReturn(keys);
  when(keyPairApi.createWithPublicKey(keypairName, sshKeyPair.getPublicKey())).thenReturn(pair);
  NovaLauncher novaLauncher = new NovaLauncher(novaContext, sshKeyPair);
  boolean uploadSuccessful = novaLauncher.uploadSshPublicKey(keypairName, nova, false);
  assertTrue(uploadSuccessful);
}