Code example for FluentIterable

Methods: toSet

0
      FluentIterable<AccountLevelGroup> expected = expected();
 
      AccountLevelGroupsHandler handler = injector.getInstance(AccountLevelGroupsHandler.class);
      FluentIterable<AccountLevelGroup> result = factory.create(handler).parse(is);
 
      assertEquals(result.toSet().toString(), expected.toSet().toString());
   } 
 
   public FluentIterable<AccountLevelGroup> expected() {
      return FluentIterable.from(ImmutableList.<AccountLevelGroup> builder()
                           .add(AccountLevelGroup.builder() 
                                                 .id("000000000000000A") 
                                                 .name("ASIA") 
                                                 .type(Type.GEOLOCATION) 
                                                 .recordCount(0).build()) 
                           .add(AccountLevelGroup.builder() 
                                                 .id("000000000000000B") 
                                                 .name("EU") 
                                                 .type(Type.GEOLOCATION) 
                                                 .recordCount(3).build())