Hi,
I have some other issues in my Spring Boot example with the usage of Neo4j to calculate the Shortest path.
I updated my repository again. I added some new options (many cities with routes instead of two cities with one route between them) for some methods but I couldn't fix them.
Is it possible to look through all test methods in AppApplicationTest class again if you don't mind?
Here are my issues shown below.
1 ) ListAll -> No JSON value $[0].name
2 ) getCityId -> java.lang.NullPointerException: Cannot invoke "com.springshortpath.app.model.City.getId()" because "city" is null
3 ) getCityByName -> org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "com.springshortpath.app.model.City.getId()" because "city" is null
4 ) updateCity -> org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "com.springshortpath.app.model.City.toString()" because "updatedCity" is null
5 ) addRoute -> org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "com.springshortpath.app.model.Route.toString()" because "savedRoute" is null
6 ) getRouteById -> No issue
7 ) listRoutesByCity -> java.lang.AssertionError: No value at JSON path "$[0]['from']"
8 ) updateRoute -> org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "com.springshortpath.app.model.Route.toString()" because "updatedRoute" is null
9 ) deleteRoute -> java.lang.IllegalStateException: Transaction must be open, but has already been closed.
10 ) shortestPath -> java.lang.AssertionError: Status expected:<200 OK> but was:<404 NOT_FOUND>
11 ) shortestPathInTime -> java.lang.AssertionError: Status expected:<200 OK> but was:<404 NOT_FOUND>
12 ) shortestPathNewConnection -> java.lang.AssertionError: Status expected:<200 OK> but was:<404 NOT_FOUND>
13 ) shortestPathInTimeNewConnection -> java.lang.AssertionError: Status expected:<200 OK> but was:<404 NOT_FOUND>
How can I fix it?
Here is my repository: Project Link