class InMemoryDatabase implements IDatabase {

    @Override
    public void insert(final IObject document, final String collectionName) throws IDatabaseException {
        synchronized (this) {
            try {
                DataBaseItem item = IOC.resolve(Keys.getOrAdd(DataBaseItem.class.getCanonicalName()), document, collectionName);
                insert(item);
            } catch (ResolutionException e) {
                throw new IDatabaseException("Failed to create DataBaseItem", e);
            }
        }
    }

    public  InMemoryDatabase();

}