import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.is;
+import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.HashMap;
}
}
+ @Test
+ public void startingTheDatabaseLoadsBookmarkedPosts() {
+ bookmarkDatabase.start();
+ verify(configurationLoader).loadBookmarkedPosts();
+ }
+
+ @Test
+ public void stoppingTheDatabaseSavesTheBookmarkedPosts() {
+ bookmarkDatabase.stop();
+ verify(configurationLoader).saveBookmarkedPosts(any(Set.class));
+ }
+
}