- private static BucketStore createStore(){
- final Props props = Props.create(BucketStore.class);
- final TestActorRef<BucketStore> testRef = TestActorRef.create(system, props, "testStore");
- return testRef.underlyingActor();
+ private static BucketStoreActor<T> createStore() {
+ final Props props = Props.create(TestingBucketStoreActor.class,
+ new RemoteRpcProviderConfig(system.settings().config()), "testing-store",new T());
+ return TestActorRef.<BucketStoreActor<T>>create(system, props, "testStore").underlyingActor();
+ }
+
+ private static final class TestingBucketStoreActor extends BucketStoreActor<T> {
+
+ protected TestingBucketStoreActor(final RemoteRpcProviderConfig config,
+ final String persistenceId,
+ final T initialData) {
+ super(config, persistenceId, initialData);
+ }
+
+ @Override
+ protected void onBucketRemoved(final Address address, final Bucket<T> bucket) {
+
+ }
+
+ @Override
+ protected void onBucketsUpdated(final Map<Address, Bucket<T>> newBuckets) {
+
+ }