Code example for FluentIterable

Methods: toSet

0
      FluentIterable<TrafficControllerPoolRecordDetail> expected = expected();
 
      TrafficControllerPoolRecordDetailListHandler handler = injector.getInstance(TrafficControllerPoolRecordDetailListHandler.class);
      FluentIterable<TrafficControllerPoolRecordDetail> result = factory.create(handler).parse(is);
 
      assertEquals(result.toSet().toString(), expected.toSet().toString());
   } 
 
   public FluentIterable<TrafficControllerPoolRecordDetail> expected() {
      return FluentIterable.from(ImmutableSet.<TrafficControllerPoolRecordDetail> builder()
                           .add(TrafficControllerPoolRecordDetail.builder() 
                                                           .id("0000000000000001") 
                                                           .poolId("0000000000000001") 
                                                           .record(createCNAME("canary.jclouds.org.")) 
                                                           .weight(2) 
                                                           .priority(2) 
                                                           .forceAnswer("Normal") 
                                                           .probingEnabled(true) 
                                                           .status(OK) 
                                                           .serving(true)