diff --git a/config/clients/java/template/build.gradle.mustache b/config/clients/java/template/build.gradle.mustache index c0fd5c14..592bc04a 100644 --- a/config/clients/java/template/build.gradle.mustache +++ b/config/clients/java/template/build.gradle.mustache @@ -96,6 +96,17 @@ testing { // See also: https://github.com/PGSSoft/HttpClientMock/issues/3 implementation "com.pgs-soft:HttpClientMock:1.0.0" } + + targets { + all { + testTask.configure { + testLogging { + exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + showStandardStreams = true + } + } + } + } } integration(JvmTestSuite) { testType = TestSuiteType.INTEGRATION_TEST @@ -112,6 +123,17 @@ testing { srcDirs = ['src/test-integration/java'] } } + + targets { + all { + testTask.configure { + testLogging { + exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + showStandardStreams = true + } + } + } + } } } } diff --git a/config/clients/java/template/client-OpenFgaClientIntegrationTest.java.mustache b/config/clients/java/template/client-OpenFgaClientIntegrationTest.java.mustache index 42f16890..4f38673e 100644 --- a/config/clients/java/template/client-OpenFgaClientIntegrationTest.java.mustache +++ b/config/clients/java/template/client-OpenFgaClientIntegrationTest.java.mustache @@ -238,10 +238,17 @@ public class OpenFgaClientIntegrationTest { ClientExpandResponse response = fga.expand(expandRequest).get(); // Then + assertNotNull(response); assertNotNull(response.getTree()); - assertEquals( - "{\"tree\":{\"root\":{\"name\":\"document:2021-budget#reader\",\"leaf\":{\"users\":{\"users\":[\"user:81684243-9356-4421-8fbf-a4f8d36aa31b\"]}}}}}", - response.getRawResponse()); + assertNotNull(response.getTree().getRoot()); + var root = response.getTree().getRoot(); + assertEquals(DEFAULT_DOC + "#reader", root.getName()); + assertNotNull(root.getLeaf()); + assertNotNull(root.getLeaf().getUsers()); + assertNotNull(root.getLeaf().getUsers().getUsers()); + var users = root.getLeaf().getUsers().getUsers(); + assertEquals(1, users.size()); + assertEquals(DEFAULT_USER, users.get(0)); } @Test