@Override
 public boolean checkStudentsUserNamesInGrouping(
     List<String> studentUsernames, Grouping grouping) {
   for (final String studentUsername : studentUsernames) {
     if (grouping.getStudentAttend(studentUsername) == null) {
       return false;
     }
   }
   return true;
 }
  @Override
  public boolean checkNotEnroledInGroup(
      Grouping grouping, StudentGroup studentGroup, String studentUsername) {

    final Attends studentAttend = grouping.getStudentAttend(studentUsername);

    if (studentAttend != null) {
      Collection<Attends> studentGroupAttends = studentGroup.getAttendsSet();
      for (final Attends attend : studentGroupAttends) {
        if (attend == studentAttend) {
          return false;
        }
      }
    }
    return true;
  }
  @Override
  public boolean checkStudentInGrouping(Grouping grouping, String username) {

    final Attends attend = grouping.getStudentAttend(username);
    return attend != null;
  }