@Test
public void testCreatePool() {

	String postData1, postData2, postData3;
	IOException error = null;
	testCreateVip();
	postData1 = "{\"id\":\"1\",\"name\":\"pool1\",\"protocol\":\"icmp\",\"vip_id\":\"1\"}";
	postData2 = "{\"id\":\"2\",\"name\":\"pool2\",\"protocol\":\"tcp\",\"vip_id\":\"2\"}";
	postData3 = "{\"id\":\"3\",\"name\":\"pool3\",\"protocol\":\"udp\",\"vip_id\":\"3\"}";
	try {
		pool1 = poolsResource.jsonToPool(postData1);
	} catch (IOException e) {
		error = e;
	}
	try {
		pool2 = poolsResource.jsonToPool(postData2);
	} catch (IOException e) {
		error = e;
	}
	try {
		pool3 = poolsResource.jsonToPool(postData3);
	} catch (IOException e) {
		error = e;
	}
	// verify correct parsing
	assertFalse(pool1==null);
	assertFalse(pool2==null);
	assertFalse(pool3==null);
	assertTrue(error==null);
	lb.createPool(pool1);
	lb.createPool(pool2);
	lb.createPool(pool3);
	// verify successful creates; two registered with vips and one not
	assertTrue(lb.pools.containsKey(pool1.id));
	assertTrue(lb.vips.get(pool1.vipId).pools.contains(pool1.id));
	assertTrue(lb.pools.containsKey(pool2.id));
	assertTrue(lb.vips.get(pool2.vipId).pools.contains(pool2.id));
	assertTrue(lb.pools.containsKey(pool3.id));
	assertFalse(lb.vips.containsKey(pool3.vipId));
}