import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.mockito.MockitoAnnotations;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
import scala.Option;
/**
*
* @author Thomas Pantelis
*/
+@RunWith(MockitoJUnitRunner.StrictStubs.class)
public class LocalSnapshotStoreTest {
private static final String PERSISTENCE_ID = "member-1-shard-default-config";
private static final String PREFIX_BASED_SHARD_PERSISTENCE_ID = "member-1-shard-id-ints!-config";
createSnapshotDir();
system = ActorSystem.create("test", ConfigFactory.load("LocalSnapshotStoreTest.conf"));
- snapshotStore = system.registerExtension(Persistence.lookup()).snapshotStoreFor(null);
+ snapshotStore = system.registerExtension(Persistence.lookup()).snapshotStoreFor(null, ConfigFactory.empty());
}
@AfterClass
@Before
public void setup() {
- MockitoAnnotations.initMocks(this);
cleanSnapshotDir();
}
}
@Test
- public void testDoLoadAsyncWithNoSnapshots() throws IOException {
+ public void testDoLoadAsyncWithNoSnapshots() {
TestKit probe = new TestKit(system);
snapshotStore.tell(new LoadSnapshot(PERSISTENCE_ID,
SnapshotSelectionCriteria.latest(), Long.MAX_VALUE), probe.getRef());