### Question:
EntityUtils { public boolean declaresDbAttribute(DbAttribute pkAttribute) { return objEntity.getAttributeForDbAttribute(pkAttribute) != null; } EntityUtils(DataMap dataMap, ObjEntity objEntity, String fqnBaseClass, String fqnSuperClass,
            String fqnSubClass);   EntityUtils(DataMap dataMap, ObjEntity objEntity, String baseClassName, String basePackageName,
            String superClassName, String superPackageName, String subClassName, String subPackageName); DataMap getPrimaryDataMap(); MappingNamespace getEntityResolver(); boolean isAbstract(); boolean isAbstract(ObjEntity anObjEntity); boolean hasToManyRelationships(); boolean hasToManyRelationships(ObjEntity anObjEntity); boolean hasToManyDeclaredRelationships(); boolean hasToManyDeclaredRelationships(ObjEntity anObjEntity); boolean hasToOneRelationships(); boolean hasToOneRelationships(ObjEntity anObjEntity); boolean hasToOneDeclaredRelationships(); boolean hasToOneDeclaredRelationships(ObjEntity anObjEntity); String getMapKeyType(final ObjRelationship relationship); boolean declaresDbAttribute(DbAttribute pkAttribute); Collection<String> getCallbackNames();  }### Answer:
@Test public void testDeclaresDbAttribute() throws Exception { DbEntity dbEntity = new DbEntity("test"); DbAttribute exists = new DbAttribute("testKey"); DbAttribute notExists = new DbAttribute("testKey1"); dbEntity.addAttribute(exists); ObjAttribute attribute = new ObjAttribute("exists"); attribute.setDbAttributePath("testKey"); objEntity.addAttribute(attribute); objEntity.setName("test"); objEntity.setDbEntity(dbEntity); dataMap.addDbEntity(dbEntity); dataMap.addObjEntity(objEntity); entityUtils = new EntityUtils(dataMap, objEntity, "TestBaseClass", "TestSuperClass", "TestSubClass"); assertTrue(entityUtils.declaresDbAttribute(exists)); assertFalse(entityUtils.declaresDbAttribute(notExists)); }