### Question:
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  AplAppStatus(); String durableTaskStart(String name, String description, boolean isCritical); String durableTaskStart(String name, String description, boolean isCritical, Double percentComplete); synchronized String durableTaskUpdate(String taskId, Double percentComplete, String message); synchronized String durableTaskUpdate(String taskId, Double percentComplete, String message, int keepPrevMessages); synchronized void durableTaskUpdate(String taskId, Double percentComplete, String message, int keepPrevMessages, Double offset); synchronized double durableTaskUpdate(String taskId, String message, double addPercents); synchronized void durableTaskPaused(String taskId, String message); synchronized void durableTaskContinue(String taskId, String message); synchronized void durableTaskFinished(String taskId, boolean isCancelled, String message); synchronized void clearFinished(Long secondsAgo); Collection<DurableTaskInfo> getTasksList(); synchronized Optional<DurableTaskInfo> findTaskByName(String taskName); double durableTaskUpdateAddPercents(String taskId, Double percentIncreaseValue);  }### Answer:
@Test void findTaskByName() { String taskId = status.durableTaskStart("sharding", "descr1", true); assertNotNull(taskId); Optional<DurableTaskInfo> taskInfo = status.findTaskByName("sharding"); assertNotNull(taskInfo); assertTrue(taskInfo.isPresent()); assertEquals("sharding", taskInfo.get().getName()); }