Open s4ndman1 opened 5 years ago
https://github.com/spring-cloud-samples/customers-stores/blob/f8ca6d7997958fd5b33972cbba24384ed42bf4f9/rest-microservices-customers/src/test/java/example/customers/CustomerRepositoryIntegrationTest.java#L48
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));
Same here
Still failing in 2021.
https://github.com/spring-cloud-samples/customers-stores/blob/f8ca6d7997958fd5b33972cbba24384ed42bf4f9/rest-microservices-customers/src/test/java/example/customers/CustomerRepositoryIntegrationTest.java#L48
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));