DB { synchronized public void close(){ if(engine == null) return; engine.close(); engine = null; collections = null; defaultSerializer = null; } DB(final Engine engine); synchronized HTreeMap<K,V> getHashMap(String name); synchronized HTreeMap<K,V> createHashMap(
            String name, Serializer<K> keySerializer, Serializer<V> valueSerializer); synchronized Set<K> getHashSet(String name); synchronized Set<K> createHashSet(String name, Serializer<K> serializer); synchronized BTreeMap<K,V> getTreeMap(String name); synchronized BTreeMap<K,V> createTreeMap(
            String name, int nodeSize, boolean valuesStoredOutsideNodes,
            BTreeKeySerializer<K> keySerializer, Serializer<V> valueSerializer, Comparator<K> comparator); Map<String, Long> getNameDir(); synchronized NavigableSet<K> getTreeSet(String name); synchronized NavigableSet<K> createTreeSet(String name, int nodeSize, BTreeKeySerializer<K> serializer, Comparator<K> comparator); synchronized Queue<E> getQueue(String name); synchronized Queue<E> getStack(String name); synchronized Queue<E> getCircularQueue(String name); synchronized Queue<E> createQueue(String name, Serializer<E> serializer); synchronized Queue<E> createStack(String name, Serializer<E> serializer, boolean useLocks); synchronized Queue<E> createCircularQueue(String name, Serializer<E> serializer, long size); synchronized void close(); synchronized boolean isClosed(); synchronized void commit(); synchronized void rollback(); synchronized void compact(); synchronized DB snapshot(); Serializer getDefaultSerializer(); Engine getEngine();  }
@Test(expected = IllegalAccessError.class) public void testClose() throws Exception { db.close(); db.getHashMap("test"); }