### Question:
ResourceHashModel implements TemplateHashModelEx, TemplateScalarModel, ResourceTemplate { @Override public boolean isEmpty() throws TemplateModelException { StmtIterator iterator = resource.listProperties(); return iterator.toList().size() == 0; } ResourceHashModel(Resource resource); @Override int size(); @Override TemplateCollectionModel keys(); @Override TemplateCollectionModel values(); @Override TemplateModel get(String s); @Override boolean isEmpty(); @Override String getAsString(); @Override Resource getResource(); final static String INVALID_URL; }### Answer:
@Test public void testEmpty() throws TemplateModelException { assertFalse("The resource is not empty", resourceHashModel.isEmpty()); }