@Test
	public void testCapacityValue() throws Exception
	{
		PersistenceManager pm = new PersistenceManager(driver,database,login,password);
		//drop everything
		pm.dropTable(Object.class);
		ConnectionWrapper cw = pm.getConnectionWrapper();
		assertEquals(0.0,pm.getUsedCapacity(cw),Math.ulp(0.0));
		cw.discard();
		
		int x = 0;
		//insert a whole bunch of things
		for(;x<1000;x++)
		{
			SimpleObject so = new SimpleObject();
			so.setName(Integer.toString(x));
			pm.saveObject(so);
		}
		//make sure we've used some capacity
		cw = pm.getConnectionWrapper();
		double cap = pm.getUsedCapacity(cw);
		assertTrue(cap>0);
		assertTrue(cap<1);
		cw.discard();
		
		//insert even more stuff
		for(;x<2000;x++)
		{
			SimpleObject so = new SimpleObject();
			so.setName(Integer.toString(x));
			pm.saveObject(so);
		}
		//make sure we've used even more capacity
		cw = pm.getConnectionWrapper();
		double cap2 = pm.getUsedCapacity(cw);
		assertTrue(cap2>0);
		assertTrue(cap2<1);
		assertTrue(cap<cap2);
		cw.discard();
		
		//make sure deleting large numbers of objects works
		pm.deleteObjects(SimpleObject.class, new All());
		String query = "SELECT COUNT(*) FROM JAVA_LANG_OBJECT";
		cw = pm.getConnectionWrapper();
		ResultSet rs = cw.prepareStatement(query).executeQuery();
		rs.next();
		assertEquals(0,rs.getLong(1));
		rs.close();
		
		pm.close();
	}