3131import java .util .HashMap ;
3232import java .util .List ;
3333import java .util .Map ;
34+ import java .util .UUID ;
3435
3536import org .junit .jupiter .api .Assertions ;
3637import org .junit .jupiter .api .Test ;
@@ -67,6 +68,7 @@ void testEmptyProblemDetails() {
6768 @ Test
6869 void testRelativeUriProblemDetails () {
6970 final int statusCode = 400 ;
71+ final UUID instance = UUID .randomUUID ();
7072 final ProblemDetails pd = SolidProblemDetails .fromErrorResponse (
7173 POD ,
7274 statusCode ,
@@ -75,21 +77,21 @@ void testRelativeUriProblemDetails() {
7577 "\" title\" :\" Some title\" ," +
7678 "\" status\" :400," +
7779 "\" detail\" :\" Some details\" ," +
78- "\" instance\" :\" https://example.org/ instance\" ," +
80+ "\" instance\" :\" Instance" + instance + " \" ," +
7981 "\" type\" :\" SomeType\" " +
8082 "}" ).getBytes ()
8183 );
8284 assertEquals (URI .create ("https://storage.test/pod/SomeType" ), pd .getType ());
8385 assertEquals (statusCode , pd .getStatus ());
8486 Assertions .assertEquals ("Some title" , pd .getTitle ());
8587 assertEquals ("Some details" , pd .getDetail ());
86- assertEquals ("https://example.org/instance" , pd .getInstance ().toString ());
88+ assertEquals ("https://storage.test/pod/Instance" + instance , pd .getInstance ().toString ());
8789 }
8890
89-
9091 @ Test
9192 void testCompleteProblemDetails () {
9293 final int statusCode = 400 ;
94+ final UUID instance = UUID .randomUUID ();
9395 final ProblemDetails pd = SolidProblemDetails .fromErrorResponse (
9496 POD ,
9597 statusCode ,
@@ -98,15 +100,15 @@ void testCompleteProblemDetails() {
98100 "\" title\" :\" Some title\" ," +
99101 "\" status\" :400," +
100102 "\" detail\" :\" Some details\" ," +
101- "\" instance\" :\" https://example.org/ instance\" ," +
103+ "\" instance\" :\" urn:uuid:" + instance + " \" ," +
102104 "\" type\" :\" https://example.org/type\" " +
103105 "}" ).getBytes ()
104106 );
105107 assertEquals ("https://example.org/type" , pd .getType ().toString ());
106108 assertEquals (statusCode , pd .getStatus ());
107109 Assertions .assertEquals ("Some title" , pd .getTitle ());
108110 assertEquals ("Some details" , pd .getDetail ());
109- assertEquals ("https://example.org/instance" , pd .getInstance ().toString ());
111+ assertEquals ("urn:uuid:" + instance , pd .getInstance ().toString ());
110112 }
111113
112114 @ Test
0 commit comments