diff --git a/logicaldoc-util/src/main/java/com/logicaldoc/util/junit/AbstractTestCase.java b/logicaldoc-util/src/main/java/com/logicaldoc/util/junit/AbstractTestCase.java index 479d19d9e..ccb6376ee 100644 --- a/logicaldoc-util/src/main/java/com/logicaldoc/util/junit/AbstractTestCase.java +++ b/logicaldoc-util/src/main/java/com/logicaldoc/util/junit/AbstractTestCase.java @@ -211,8 +211,7 @@ private void destroyDatabase() throws SQLException { } protected Connection getConnection() throws SQLException { - DataSource ds = (DataSource) context.getBean("DataSource"); - return ds.getConnection(); + return context.getBean(DataSource.class).getConnection(); } protected void waiting() throws InterruptedException {