aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/test/java/com/juick/components
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/test/java/com/juick/components')
-rw-r--r--juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java19
1 files changed, 5 insertions, 14 deletions
diff --git a/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java b/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java
index 8aac9501a..454b43ba9 100644
--- a/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java
+++ b/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java
@@ -9,7 +9,6 @@ import com.juick.components.service.TokenService;
import com.notnoop.apns.ApnsService;
import org.junit.Before;
import org.junit.Test;
-import org.mockito.ArgumentMatcher;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@@ -20,7 +19,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Map;
-import static org.mockito.Matchers.argThat;
+import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -57,19 +56,11 @@ public class NotificationTests {
when(mockAppender.getName()).thenReturn("MOCK");
root.addAppender(mockAppender);
cleanUp.cleanupTokens();
- verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
- @Override
- public boolean matches(final Object argument) {
- return ((LoggingEvent)argument).getFormattedMessage().contains("1 tokens to delete");
- }
- }));
+ verify(mockAppender).doAppend(argThat(argument ->
+ ((LoggingEvent)argument).getFormattedMessage().contains("1 tokens to delete")));
when(service.getInactiveDevices()).thenReturn(new HashMap<>());
cleanUp.cleanupTokens();
- verify(mockAppender).doAppend(argThat(new ArgumentMatcher() {
- @Override
- public boolean matches(final Object argument) {
- return ((LoggingEvent)argument).getFormattedMessage().contains("No APNS tokens to delete");
- }
- }));
+ verify(mockAppender).doAppend(argThat(argument ->
+ ((LoggingEvent)argument).getFormattedMessage().contains("No APNS tokens to delete")));
}
}