diff --git a/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastTest.java b/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastTest.java index f66bd5d4e4..ffe8da9bec 100644 --- a/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastTest.java +++ b/persistence-modules/java-jpa/src/test/java/com/baeldung/jpa/stringcast/SpringCastTest.java @@ -50,9 +50,7 @@ public class SpringCastTest { @Test public void givenExecutorGeneric_whenQueryReturnsOneColumn_thenNoClassCastThrown() { List results = QueryExecutor.executeNativeQueryGeneric("select text from dummy", "textQueryMapping", em); - assertEquals("text", results - .get(0) - .getText()); + assertEquals("text", results.get(0).getText()); } }