From 0b9545a8b74aca473cb776275be4dc93a327c363 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Mon, 16 Jul 2012 16:22:11 +0200 Subject: Remove warnings --- .../server/startup/ServerMetadataPersisterTest.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'sonar-server') diff --git a/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java b/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java index 67dd9290b6c..beef9e2db4d 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/ServerMetadataPersisterTest.java @@ -19,10 +19,10 @@ */ package org.sonar.server.startup; +import com.google.common.collect.ImmutableMap; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.mockito.ArgumentMatcher; import org.sonar.api.CoreProperties; import org.sonar.api.platform.Server; import org.sonar.server.platform.PersistentSettings; @@ -30,10 +30,8 @@ import org.sonar.server.platform.PersistentSettings; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Map; import java.util.TimeZone; -import static org.mockito.Matchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -66,16 +64,10 @@ public class ServerMetadataPersisterTest { ServerMetadataPersister persister = new ServerMetadataPersister(server, persistentSettings); persister.start(); - verify(persistentSettings).saveProperties(argThat(new ArgumentMatcher>() { - @Override - public boolean matches(Object o) { - Map map = (Map) o; - return map.get(CoreProperties.SERVER_ID).equals("123") - && map.get(CoreProperties.SERVER_VERSION).equals("3.2") - && map.get(CoreProperties.SERVER_STARTTIME).equals("2010-05-18T17:59:00+0000") - && map.size() == 3; - } - })); + verify(persistentSettings).saveProperties(ImmutableMap.of( + CoreProperties.SERVER_ID, "123", + CoreProperties.SERVER_VERSION, "3.2", + CoreProperties.SERVER_STARTTIME, "2010-05-18T17:59:00+0000")); } } -- cgit v1.2.3