### Question:
TaskAssignmentResourceFacadeImp extends CoreDBServiceFacadeImp<TaskAssignment, Long> implements TaskAssignmentResourceFacade { @Override public Integer getPendingTaskCount(Long userID) { try { List<TaskAssignment> taskAssignments = getAllByCriteria(Restrictions.eq("id.userId",userID)); logger.info("pending for userID " + userID + "tasks = " + (taskAssignments != null ? taskAssignments.size() : "null")); return (taskAssignments != null ? taskAssignments.size() : 0); } catch (Exception e) { logger.error("Error in find operation: userID = " + userID); } return -1; } TaskAssignmentResourceFacadeImp(); @Override int insertTaskAssignment(List<DocumentDTO> taskList, Long userID); @Override int insertOneTaskAssignment(Long documentID, Long userID); @Override int undoTaskAssignment(List<DocumentDTO> taskList, Long userID); @Override int undoTaskAssignment(Map<Long, Long> taskMap); @Override int undoTaskAssignment(Long documentID, Long userID); @Override void undoTaskAssignmentByTimer(); @Override TaskAssignmentDTO findTaskAssignment(Long documentID, Long userID); @Override List<TaskAssignmentDTO> findTaskAssignmentByID(Long documentID); @Override Integer getPendingTaskCount(Long userID);  }### Answer:
@Test public void testGetPendingTaskCount() { Integer result = taskAssignmentResourceFacadeImp.getPendingTaskCount(user.getUserID()); assertEquals(Integer.valueOf(1),result); }