class AplAppStatus {

    public synchronized Optional<DurableTaskInfo> findTaskByName(String taskName) {
        Objects.requireNonNull(taskName, "taskName is NULL");
        for (DurableTaskInfo taskInfo : tasks.values()) {
            if (taskInfo.getName() != null && !taskInfo.getName().isEmpty() && taskInfo.getName().contains(taskName)) {
                return Optional.of(taskInfo);
            }
        }
        return Optional.empty();
    }

    @Inject public  AplAppStatus();

}