Code example for FluentIterable

Methods: toSet

0
      FluentIterable<DirectionalPool> expected = expected();
 
      DirectionalPoolListHandler handler = injector.getInstance(DirectionalPoolListHandler.class);
      FluentIterable<DirectionalPool> result = factory.create(handler).parse(is);
 
      assertEquals(result.toSet().toString(), expected.toSet().toString());
   } 
 
   public FluentIterable<DirectionalPool> expected() {
      return FluentIterable.from(ImmutableList.<DirectionalPool> builder()
                           .add(DirectionalPool.builder() 
                                               .zoneId("0000000000000001") 
                                               .id("000000000000000A") 
                                               .dname("mixy.jclouds.org.") 
                                               .type(Type.MIXED) 
                                               .tieBreak(TieBreak.GEOLOCATION) 
                                               .name("mixy").build()) 
                           .add(DirectionalPool.builder() 
                                               .zoneId("0000000000000002") 
                                               .id("000000000000000B")