Write java test code for the code


fileName /content/javaFiles/ProductRepository.java 

package com.bootexample4.products.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import com.bootexample4.products.model.Product;

public interface ProductRepository extends JpaRepository<Product,Long>{
    
}


##################



fileName /content/javaFiles/ProductController.java 

package com.bootexample4.products.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import com.bootexample4.products.model.Product;
import com.bootexample4.products.repository.ProductRepository;

@RestController
@RequestMapping("/api/products")
public class ProductController {

    @Autowired
    private ProductRepository productRepository;

    @GetMapping
    public List<Product> getAllProducts() {
        return productRepository.findAll();
    }

    @PostMapping
    public Product createProduct(@RequestBody Product product) {
        return productRepository.save(product);
    }

    @GetMapping("/{id}")
    public ResponseEntity<Product> getProductById(@PathVariable Long id) {
        return productRepository.findById(id)
                .map(product -> ResponseEntity.ok().body(product))
                .orElse(ResponseEntity.notFound().build());
    }

    @PutMapping("/{id}")
    public ResponseEntity<Product> updateProduct(@PathVariable Long id, @RequestBody P Provide exactly two different responses that are separated with 6 asterisk symbols: ******.
user