}
@Test
public void testListDatastore() throws Exception {
CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
DatastoreRead rd1 = new DatastoreRead();
rd1.setName("rd1Name");
rd1.setType(DatastoreType.LOCAL);
rd1.setTotalSpaceGB(100.32);
rd1.setFreeSpaceGB(50.00);
List<DatastoreReadDetail> datastoreReadDetails1 =
new ArrayList<DatastoreReadDetail>();
DatastoreReadDetail dr1Detail1 = new DatastoreReadDetail();
dr1Detail1.setVcDatastoreName("vcds1");
dr1Detail1.setHost("10.1.1.1");
dr1Detail1.setTotalStorageSizeGB(90.32);
dr1Detail1.setFreeSpaceGB(45.00);
DatastoreReadDetail dr1Detail2 = new DatastoreReadDetail();
dr1Detail2.setVcDatastoreName("vcds2");
dr1Detail2.setHost("10.1.1.2");
dr1Detail2.setTotalStorageSizeGB(10.00);
dr1Detail2.setFreeSpaceGB(5.00);
datastoreReadDetails1.add(dr1Detail1);
datastoreReadDetails1.add(dr1Detail2);
rd1.setDatastoreReadDetails(datastoreReadDetails1);
DatastoreRead rd2 = new DatastoreRead();
rd2.setName("rd2Name");
rd2.setType(DatastoreType.SHARED);
rd2.setTotalSpaceGB(20.00);
rd2.setFreeSpaceGB(15.00);
List<DatastoreReadDetail> datastoreReadDetails2 =
new ArrayList<DatastoreReadDetail>();
DatastoreReadDetail dr2Detail1 = new DatastoreReadDetail();
dr2Detail1.setVcDatastoreName("vcds2");
dr2Detail1.setHost("10.1.1.3");
dr2Detail1.setTotalStorageSizeGB(20.00);
dr2Detail1.setFreeSpaceGB(15.00);
datastoreReadDetails2.add(dr2Detail1);
rd2.setDatastoreReadDetails(datastoreReadDetails2);
ObjectMapper mapper = new ObjectMapper();
testListDatastore(mapper, new DatastoreRead[] { rd1, rd2 });
CookieCache.clear();
}