findById (existente e não existente)

Comportamento simulado

ID existente:

@Test
public void findByIdShouldReturnProductDtoWhenIdExists() {
    ProductDTO result = productService.findById(existingId);

    Assertions.assertNotNull(result);
}

ID não existente:

@Test
public void findByIdShouldThrowResourceNotFoundExceptionWhenIdDoesntExist() {
    Assertions.assertThrows(ResourceNotFoundException.class, () -> {
       productService.findById(nonExistingId);
    });
}

Atualizado