try {
//
// Make sure data is added
Soda2Consumer consumer = new Soda2Consumer(connection);
SoqlQuery sortQuery = new SoqlQueryBuilder()
.addOrderByPhrase(new OrderByClause(SortOrder.Ascending, "name"))
.build();
List<NominationsWText> nominations = consumer.query(createdView.getId(), sortQuery, NominationsWText.LIST_TYPE);
TestCase.assertEquals(2, nominations.size());
TestCase.assertEquals("Kitty, Hello", nominations.get(0).getName());
TestCase.assertEquals("Name, Test", nominations.get(1).getName());
createdView.setResourceName(name);
createdView = importer.updateDatasetInfo(createdView);
consumer = new Soda2Consumer(connection);
sortQuery = new SoqlQueryBuilder()
.addOrderByPhrase(new OrderByClause(SortOrder.Ascending, "name"))
.build();
nominations = consumer.query(createdView.getId(), sortQuery, NominationsWText.LIST_TYPE);
TestCase.assertEquals(2, nominations.size());
TestCase.assertEquals("Kitty, Hello", nominations.get(0).getName());
TestCase.assertEquals("Name, Test", nominations.get(1).getName());