taskManagerApiRest/src/main/java/com/salvador/thiago/taskManagerApiRest/service/TaskService.java
public Task findByIdEntity(Long id) {
		Optional<Task> obj = repository.findById(id);
		return obj.orElseThrow(() -> new ObjectNotFoundException(
				"Object not found! id: "+ id + ", type" + Task.class.getName()));
	}
/**
	   * <p> Responsible method to validatio Exception <p>
	   * 
	   * @param Long id
	   * @return Task
	   */
 Responsible method to validatio Exception 

@param Long id
@return Task
Responsible method to validatio Exception @param Long id @return Task
public Task findByIdEntity(Long id) {
		Optional<Task> obj = repository.findById(id);
		return obj.orElseThrow(() -> new ObjectNotFoundException(
				"Object not found! id: "+ id + ", type" + Task.class.getName()));
	}
public Task findByIdEntity ( Long id ) { Optional < Task > obj = repository . findById ( id ) ; return obj . orElseThrow ( ( ) -> new ObjectNotFoundException ( "Object not found! id: " + id + ", type" + Task . class . getName ( ) ) ) ; }
<p> Responsible method to validatio Exception <p>
<p > Responsible method to validatio Exception <p >