Verify that Sones are saved correctly.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Dec 2014 05:39:01 +0000 (06:39 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Dec 2014 05:39:01 +0000 (06:39 +0100)
src/test/java/net/pterodactylus/sone/database/memory/MemoryDatabaseTest.java

index ac53a5d..1d7d471 100644 (file)
@@ -427,9 +427,11 @@ public class MemoryDatabaseTest {
 
        @Test
        public void stoppingTheDatabaseSavesTheKnownSones() throws ConfigurationException {
 
        @Test
        public void stoppingTheDatabaseSavesTheKnownSones() throws ConfigurationException {
+               configurationValues.put("KnownSones/0/ID", Mockito.spy(TestValue.from(SONE_ID)));
                memoryDatabase.startAndWait();
                memoryDatabase.stopAndWait();
                memoryDatabase.startAndWait();
                memoryDatabase.stopAndWait();
-               verify(configurationValues.get("KnownSones/0/ID")).setValue(null);
+               verify(configurationValues.get("KnownSones/0/ID")).setValue(SONE_ID);
+               verify(configurationValues.get("KnownSones/1/ID")).setValue(null);
        }
 
 }
        }
 
 }