### Question:
Model extends BaseObject { public <T extends Model> EntityCollection<T> collection(String name) { ManagedType<? extends Model> type = getEntityManager().getMetamodel().managedType(getClass()); EntityCollection<T> collection = null; if (type.getAttribute(name).isCollection()) { Class<T> elementType = ((PluralAttribute) type.getAttribute(name)).getElementType().getJavaType(); collection = new EntityCollection<T>(this, name, elementType); } return collection; } Model(); void updateAttributes(Map<String, Object> attributes); abstract Serializable getId(); static T findById(Serializable id); static long count(); static long count(Filter filter); static List<T> all(); static void deleteAll(); static void deleteAll(Filter filter); static boolean exists(Serializable id); static Filter filter(); static List<T> where(Object... paramValues); static List<T> where(Filter filter); static T one(Object... paramValues); static T first(Object... paramValues); static EntityTransaction beginTxn(); void persist(); void delete(); void merge(); void refresh(); EntityCollection<T> collection(String name);  }### Answer:
@Test public void shouldReturnNullIfNotACollection() { DummyModel parent = createModel("test1", "test123"); assertNull(parent.collection("column1")); }