> +   
> +   public void testCreateAccount() throws Exception {
> +     api().createAccount(CreateAccount.create(username, password, null));
> +   }
> +   
> +   @Test (dependsOnMethods = "testCreateAccount")
> +   public void testListAccounts() throws Exception {
> +      List<AccountInfo> possibleAccounts = api().listAccounts();
> +      assertNotNull(possibleAccounts, "possibleAccounts was not set");
> +      assertTrue(possibleAccounts.size() > 0, "Expected at least 1 Account 
> but list was empty");
> +      boolean accountFound = false;
> +      for (AccountInfo possibleAccount : possibleAccounts) {
> +         if (possibleAccount.username().equals(username)) {
> +            accountFound = true;
> +         }
> +      }

Use a more idiomatic Iterables.find or similar approach.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/165/files#r28409402

Reply via email to