} catch (EJBException ejbe) { log.warn("Should not be here.");
    public void testCountingApiExceptions(){        Set ids = Collections.singleton(new Long(1));        // Does not exist        try {            iPojos.getCollectionCount("DoesNotExist","meNeither",ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Missing plural on dataset        try {            iPojos.getCollectionCount("ome.model.containers.Project","dataset",ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Null ids        try {            iPojos.getCollectionCount("ome.model.containers.Project","datasets",null,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Poorly formed        try {            iPojos.getCollectionCount("hackers.rock!!!","",ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Empty Class string        try {            iPojos.getCollectionCount("","datasets",ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Empty Class string        try {            iPojos.getCollectionCount(null,"datasets",ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Empty property string        try {            iPojos.getCollectionCount("ome.model.core.Image","",ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }        // Null property string        try {            iPojos.getCollectionCount("ome.model.core.Image",null,ids,null);            fail("An exception should have been thrown");        } catch (ApiUsageException e) {            // Good.        }    }