From eb839c3968ae8216aec050998e4c858886d3fbf6 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 10 Sep 2020 12:46:09 +0200 Subject: [PATCH] do not use internal FieldSetter Signed-off-by: tobiasKaminsky --- .../owncloud/android/ui/adapter/ActivityListAdapterTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/owncloud/android/ui/adapter/ActivityListAdapterTest.java b/src/test/java/com/owncloud/android/ui/adapter/ActivityListAdapterTest.java index dd7c5859ba..e37cdeb08a 100644 --- a/src/test/java/com/owncloud/android/ui/adapter/ActivityListAdapterTest.java +++ b/src/test/java/com/owncloud/android/ui/adapter/ActivityListAdapterTest.java @@ -28,7 +28,6 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.mockito.internal.util.reflection.FieldSetter; import java.util.ArrayList; @@ -39,10 +38,10 @@ public final class ActivityListAdapterTest { private ActivityListAdapter activityListAdapter; @Before - public void setUp() throws NoSuchFieldException { + public void setUp() { MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(activityListAdapter); - FieldSetter.setField(activityListAdapter, activityListAdapter.getClass().getDeclaredField("values"), new ArrayList<>()); + activityListAdapter.values = new ArrayList<>(); } @Test