|
assertThat(repository.findById(customer.id), is(customer)); |
assertThat(repository.findById(customer.id), is(customer));
Throws an error as it returns type "java.util.Optional" instead of "example.customers.Customer" fixed it by changing assert to.
assertThat(repository.findById(customer.id).get(), is(customer));
customers-stores/rest-microservices-customers/src/test/java/example/customers/CustomerRepositoryIntegrationTest.java
Line 48 in f8ca6d7
assertThat(repository.findById(customer.id), is(customer));Throws an error as it returns type "java.util.Optional" instead of "example.customers.Customer" fixed it by changing assert to.
assertThat(repository.findById(customer.id).get(), is(customer));