aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/web/WebServerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/traccar/web/WebServerTest.java')
-rw-r--r--src/test/java/org/traccar/web/WebServerTest.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/test/java/org/traccar/web/WebServerTest.java b/src/test/java/org/traccar/web/WebServerTest.java
index 5a79fbac2..ba4124e44 100644
--- a/src/test/java/org/traccar/web/WebServerTest.java
+++ b/src/test/java/org/traccar/web/WebServerTest.java
@@ -6,8 +6,6 @@ import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class WebServerTest {
@@ -15,12 +13,7 @@ public class WebServerTest {
@Test
public void contextTest() throws NamingException {
DataSource mockDataSource = (DataSource) Proxy.newProxyInstance(getClass().getClassLoader(),
- new Class[] { DataSource.class }, new InvocationHandler() {
- @Override
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- return null;
- }
- });
+ new Class[]{DataSource.class}, (proxy, method, args) -> null);
Context context = new InitialContext();
context.bind("java:/DefaultDS", mockDataSource);