SelectorBuilder builder = new SelectorBuilder();
builder =
builder.fields("Id", "Name", "Status", "StartDate", "EndDate", "ServingStatus", "Settings");
Selector selector = builder.build();
Assert.assertEquals(7, selector.getFields().length);
Assert.assertEquals("Id", selector.getFields()[0]);
Assert.assertEquals("Name", selector.getFields()[1]);
Assert.assertEquals("Status", selector.getFields()[2]);
Assert.assertEquals("StartDate", selector.getFields()[3]);
Assert.assertEquals("EndDate", selector.getFields()[4]);
Assert.assertEquals("ServingStatus", selector.getFields()[5]);
Assert.assertEquals("Settings", selector.getFields()[6]);
selector = builder.fields("Id",
"Name",
"Status",
"StartDate",
"EndDate",
"ServingStatus",
"Settings",
"Id",
"AverageCpc").build();
Assert.assertEquals(8, selector.getFields().length);
Assert.assertEquals("Id", selector.getFields()[0]);
Assert.assertEquals("Name", selector.getFields()[1]);
Assert.assertEquals("Status", selector.getFields()[2]);
Assert.assertEquals("StartDate", selector.getFields()[3]);
Assert.assertEquals("EndDate", selector.getFields()[4]);
Assert.assertEquals("ServingStatus", selector.getFields()[5]);
Assert.assertEquals("Settings", selector.getFields()[6]);
Assert.assertEquals("AverageCpc", selector.getFields()[7]);
}