### Question:
DaoManager { public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource, Class<T> clazz) { if (connectionSource == null) { throw new IllegalArgumentException("connectionSource argument cannot be null"); } ClassConnectionSource key = new ClassConnectionSource(connectionSource, clazz); Dao<?, ?> dao = lookupDao(key); @SuppressWarnings("unchecked") D castDao = (D) dao; return castDao; }  synchronized static D createDao(ConnectionSource connectionSource, Class<T> clazz); synchronized static D lookupDao(ConnectionSource connectionSource, Class<T> clazz); synchronized static D createDao(ConnectionSource connectionSource,
			DatabaseTableConfig<T> tableConfig); synchronized static D lookupDao(ConnectionSource connectionSource,
			DatabaseTableConfig<T> tableConfig); static synchronized void registerDao(ConnectionSource connectionSource, Dao<?, ?> dao); static synchronized void unregisterDao(ConnectionSource connectionSource, Dao<?, ?> dao); static synchronized void registerDaoWithTableConfig(ConnectionSource connectionSource, Dao<?, ?> dao); static synchronized void clearCache(); static synchronized void clearDaoCache(); static synchronized void addCachedDatabaseConfigs(Collection<DatabaseTableConfig<?>> configs);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testLookupDaoNull() { DaoManager.lookupDao(null, Foo.class); }
@Test public void testLookupDaoUnknown() { assertNull(DaoManager.lookupDao(connectionSource, getClass())); }
@Test(expected = IllegalArgumentException.class) public void testLookupDaoTableNull() { DaoManager.lookupDao(null, new DatabaseTableConfig<Foo>()); }
@Test public void testLookupTableDaoUnknown() { assertNull(DaoManager.lookupDao(connectionSource, new DatabaseTableConfig<DaoManagerTest>(DaoManagerTest.class, new ArrayList<DatabaseFieldConfig>()))); }