Selector selector = builder.build();
Assert.assertNotNull(selector.getOrdering());
Assert.assertEquals(1, selector.getOrdering().size());
OrderBy orderBy = selector.getOrdering().get(0);
Assert.assertEquals("AverageCpm", orderBy.getField());
Assert.assertEquals(SortOrder.ASCENDING, orderBy.getSortOrder());
builder.orderDescBy("AverageCpc");
selector = builder.build();
Assert.assertNotNull(selector.getOrdering());
Assert.assertEquals(2, selector.getOrdering().size());
orderBy = selector.getOrdering().get(0);
Assert.assertEquals("AverageCpm", orderBy.getField());
Assert.assertEquals(SortOrder.ASCENDING, orderBy.getSortOrder());
orderBy = selector.getOrdering().get(1);
Assert.assertEquals("AverageCpc", orderBy.getField());
Assert.assertEquals(SortOrder.DESCENDING, orderBy.getSortOrder());
selector = builder.removeOrderBy("AverageCpm").build();
Assert.assertNotNull(selector.getOrdering());
Assert.assertEquals(1, selector.getOrdering().size());
orderBy = selector.getOrdering().get(0);
Assert.assertEquals("AverageCpc", orderBy.getField());
Assert.assertEquals(SortOrder.DESCENDING, orderBy.getSortOrder());
}