### Question:
CustomUiTemplateResourceFacadeImp extends CoreDBServiceFacadeImp<CustomUiTemplate, Long> implements CustomUiTemplateResourceFacade { @Override public List<CustomUiTemplateDTO> getCustomUITemplateBasedOnTypeByCrisisID(long crisisID, int templateType) { logger.info("getCustomUITemplateBasedOnTypeByCrisisID: " + crisisID + "-" + templateType ); Criterion criterion = Restrictions.conjunction() .add(Restrictions.eq("crisisID",crisisID)) .add(Restrictions.eq("templateType", templateType)); List<CustomUiTemplateDTO> dtoList = null; try { List<CustomUiTemplate> customUITemplates = this.getAllByCriteria(criterion); if (customUITemplates != null) { dtoList = new ArrayList<CustomUiTemplateDTO>(0); for (CustomUiTemplate c: customUITemplates) { CustomUiTemplateDTO dto = new CustomUiTemplateDTO(c); dtoList.add(dto); } } return dtoList; } catch (Exception e) { logger.error("Error in getCustomUITemplateBasedOnTypeByCrisisID for crisisID : " + crisisID); return null; } } protected  CustomUiTemplateResourceFacadeImp(); @Override List<CustomUiTemplateDTO> getAllCustomUITemplateByCrisisID(long crisisID); @Override List<CustomUiTemplateDTO> getCustomUITemplateBasedOnTypeByCrisisID(long crisisID, int templateType); @Override List<CustomUiTemplateDTO> getCustomUITemplateBasedOnTypeByCrisisIDAndAttributeID(long crisisID, long attributeID, int templateType); @Override List<CustomUiTemplateDTO> getCustomUITemplateBasedOnTypeByCrisisIDAttributeIDAndStatus(long crisisID, long attributeID, int templateType, int status); @Override List<CustomUiTemplateDTO> getCustomUITemplateByCrisisIDAndAttributeID(long crisisID, long attributeID); @Override CustomUiTemplateDTO addCustomUITemplate(CustomUiTemplateDTO customUITemplate); @Override CustomUiTemplateDTO updateCustomUITemplate(CustomUiTemplateDTO currentTemplate, CustomUiTemplateDTO updatedTemplate); @Override CustomUiTemplateDTO updateCustomUITemplateStatus(CustomUiTemplateDTO currentTemplate, CustomUiTemplateDTO updatedTemplate); @Override void deleteCustomUITemplateBasedOnTypeByCrisisID(long crisisID, int type); @Override void deleteCustomUITemplateByCrisisID(long crisisID); int deleteCustomUiTemplateById(long customUiTemplateId); CustomUiTemplateDTO getCustomUITemplateByID(long customUiTemplateId);  }### Answer:
@Test public void testGetCustomUITemplateBasedOnTypeByCrisisID() { entityManager.getTransaction().begin(); List<CustomUiTemplateDTO> result = customUiTemplateResourceFacadeImp.getCustomUITemplateBasedOnTypeByCrisisID(crisis.getCrisisID(), 1); entityManager.getTransaction().commit(); assertTrue(result.size()>=1); }