HashMap map = new HashMap() { public Object get(Object key) { return "dummy"; } }; EJBLocalHome home = new TestLocalHome(map);
HashMap map = new DummyHashMap(); EJBLocalHome home = new DummyLocalHome(map);
    public void testUnableToFindFreeID() throws Exception {        try {            // use a map that always return non null to fake that it always find an existing id            HashMap map = new HashMap() {                public Object get(Object key) {                    return "dummy";                }            };            EJBLocalHome home = new TestLocalHome(map);            SimpleSequenceGenerator.getNextCount( home );            fail("Should generate an EJBException when no free ID");        } catch (EJBException e){            assertNull("Should be a clean EJBException", e.getCause());        }    }