@NotNull
  public Set<CustomTaskState> getAvailableTaskStates(@NotNull Task task) throws Exception {
    //noinspection unchecked
    return ContainerUtil.map2Set(getRepositoryType().getPossibleTaskStates(),
                                 (Function<TaskState, CustomTaskState>)state -> CustomTaskState.fromPredefined(state));
  }
@NotNull
  public Set<CustomTaskState> getAvailableTaskStates(@NotNull Task task)