Implemented a Builder pattern for EventuallyConsistentMaps.

EventuallyConsistentMap has been moved to the API package so is now available outside the stores.

ONOS-1357

Change-Id: I1c892eb3dbefa72cb3f3eb3ccc74e9a02c7e2ac9
diff --git a/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java b/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java
index f7c9323..8629fcd 100644
--- a/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/ecmap/EventuallyConsistentMapImplTest.java
@@ -34,10 +34,13 @@
 import org.onosproject.store.cluster.messaging.ClusterMessage;
 import org.onosproject.store.cluster.messaging.ClusterMessageHandler;
 import org.onosproject.store.cluster.messaging.MessageSubject;
-import org.onosproject.store.impl.ClockService;
+import org.onosproject.store.service.ClockService;
 import org.onosproject.store.impl.WallClockTimestamp;
 import org.onosproject.store.serializers.KryoNamespaces;
 import org.onosproject.store.serializers.KryoSerializer;
+import org.onosproject.store.service.EventuallyConsistentMap;
+import org.onosproject.store.service.EventuallyConsistentMapEvent;
+import org.onosproject.store.service.EventuallyConsistentMapListener;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -134,10 +137,13 @@
                 .register(KryoNamespaces.API)
                 .register(TestTimestamp.class);
 
-        ecMap = new EventuallyConsistentMapImpl<>(MAP_NAME, clusterService,
-                                                  clusterCommunicator,
-                                                  serializer, clockService)
-                                        .withBroadcastMessageExecutor(MoreExecutors.newDirectExecutorService());
+        ecMap = new EventuallyConsistentMapBuilderImpl<>(
+                        clusterService, clusterCommunicator)
+                .withName(MAP_NAME)
+                .withSerializer(serializer)
+                .withClockService(clockService)
+                .withCommunicationExecutor(MoreExecutors.newDirectExecutorService())
+                .build();
 
         // Reset ready for tests to add their own expectations
         reset(clusterCommunicator);