ProjectAssignmentStatus implements Serializable { public boolean isAssignmentBookable() { boolean isBookable = true; for (Status status : statusses) { isBookable &= (status == Status.RUNNING || status == Status.IN_OVERRUN || status == Status.IN_ALLOTTED); } return isBookable; } ProjectAssignmentStatus(); boolean isValid(); void setValid(boolean valid); boolean isAssignmentBookable(); void addStatus(Status status); boolean equals(Object object); int hashCode(); String toString(); AssignmentAggregateReportElement getAggregate(); void setAggregate(AssignmentAggregateReportElement aggregate); List<Status> getStatusses(); void setStatusses(List<Status> statusses);  }
@Test public void testIsAssignmentBookable() { ProjectAssignmentStatus status = new ProjectAssignmentStatus(); List<Status> statusses = new ArrayList<>(); statusses.add(ProjectAssignmentStatus.Status.RUNNING); statusses.add(ProjectAssignmentStatus.Status.IN_ALLOTTED); status.setStatusses(statusses); assertTrue(status.isAssignmentBookable()); }