// Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
// 
//     @Id
//     @GeneratedValue
//     private Long id;
// 
//     private String name;
// 
//     public Customer(String name) {
//         this.name = name;
//     }
// 
//     public Customer() {
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// }
// 
// Path: customer-service/src/main/java/de/codecentric/resilient/customer/exception/CustomerNotFoundException.java
// public class CustomerNotFoundException extends RuntimeException {
//     public CustomerNotFoundException(String message) {
//         super(message);
//     }
// 
//     public CustomerNotFoundException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: customer-service/src/main/java/de/codecentric/resilient/customer/repository/CustomerRepository.java
// public interface CustomerRepository extends CrudRepository<Customer, Long> {
//     Customer findByName(String name);
// }


import org.springframework.beans.factory.annotation.Autowired;
import de.codecentric.resilient.customer.entity.Customer;
import de.codecentric.resilient.customer.exception.CustomerNotFoundException;
import de.codecentric.resilient.customer.repository.CustomerRepository;
import org.springframework.stereotype.Service;
package de.codecentric.resilient.customer.service;


/**
 * @author Benjamin Wilms
 */
@Service
public class CustomerService {

    private final CustomerRepository customerRepository;

    @Autowired
// Path: customer-service/src/main/java/de/codecentric/resilient/customer/entity/Customer.java
// @Entity
// public class Customer {
// 
//     @Id
//     @GeneratedValue
//     private Long id;
// 
//     private String name;
// 
//     public Customer(String name) {
//         this.name = name;
//     }
// 
//     public Customer() {
//     }
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// }
// 
// Path: customer-service/src/main/java/de/codecentric/resilient/customer/exception/CustomerNotFoundException.java
// public class CustomerNotFoundException extends RuntimeException {
//     public CustomerNotFoundException(String message) {
//         super(message);
//     }
// 
//     public CustomerNotFoundException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: customer-service/src/main/java/de/codecentric/resilient/customer/repository/CustomerRepository.java
// public interface CustomerRepository extends CrudRepository<Customer, Long> {
//     Customer findByName(String name);
// }


// Path: customer-service/src/main/java/de/codecentric/resilient/customer/service/CustomerService.java
import org.springframework.beans.factory.annotation.Autowired;
import de.codecentric.resilient.customer.entity.Customer;
import de.codecentric.resilient.customer.exception.CustomerNotFoundException;
import de.codecentric.resilient.customer.repository.CustomerRepository;
import org.springframework.stereotype.Service;

package de.codecentric.resilient.customer.service;


/**
 * @author Benjamin Wilms
 */
@Service
public class CustomerService {

    private final CustomerRepository customerRepository;

    @Autowired
    public CustomerService(CustomerRepository customerRepository) {