diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/OpenflowControllerAdapter.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/OpenflowControllerAdapter.java
index 8900d9d..20e2aed 100644
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/OpenflowControllerAdapter.java
+++ b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/OpenflowControllerAdapter.java
@@ -52,10 +52,6 @@
     }
 
     @Override
-    public void monitorAllEvents(boolean monitor) {
-    }
-
-    @Override
     public void addListener(OpenFlowSwitchListener listener) {
     }
 
@@ -64,6 +60,16 @@
     }
 
     @Override
+    public void addMessageListener(OpenFlowMessageListener listener) {
+
+    }
+
+    @Override
+    public void removeMessageListener(OpenFlowMessageListener listener) {
+
+    }
+
+    @Override
     public void addPacketListener(int priority, PacketListener listener) {
     }
 
diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitchTest.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitchTest.java
deleted file mode 100644
index f726e50..0000000
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitchTest.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright 2015-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.openflow.controller.driver;
-
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelConfig;
-import org.jboss.netty.channel.ChannelFactory;
-import org.jboss.netty.channel.ChannelFuture;
-import org.jboss.netty.channel.ChannelPipeline;
-import org.junit.Before;
-import org.junit.Test;
-import org.onosproject.openflow.controller.Dpid;
-import org.onosproject.openflow.controller.OpenFlowEventListener;
-import org.onosproject.openflow.controller.RoleState;
-import org.projectfloodlight.openflow.protocol.OFMessage;
-
-import java.net.SocketAddress;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasSize;
-import static org.hamcrest.Matchers.is;
-
-/**
- * Tests for packet processing in the abstract openflow switch class.
- */
-public class AbstractOpenFlowSwitchTest {
-
-    OpenFlowSwitchImpl ofSwitch;
-    TestExecutorService executorService;
-
-    /**
-     * Mock executor service that tracks submits.
-     */
-    static class TestExecutorService extends ExecutorServiceAdapter {
-        private List<OFMessage> submittedMessages = new ArrayList<>();
-
-        List<OFMessage> submittedMessages() {
-            return submittedMessages;
-        }
-
-        @Override
-        public void execute(Runnable task) {
-            AbstractOpenFlowSwitch.OFMessageHandler handler =
-                    (AbstractOpenFlowSwitch.OFMessageHandler) task;
-            submittedMessages.add(handler.msg);
-        }
-    }
-
-    /**
-     * Sets up switches to use as data.
-     */
-    @Before
-    public void setUp() {
-        ofSwitch = new OpenFlowSwitchImpl();
-
-        executorService = new TestExecutorService();
-        ofSwitch.executorMsgs = executorService;
-        Channel channel = new MockChannel();
-        ofSwitch.setChannel(channel);
-        ofSwitch.role = RoleState.MASTER;
-        ofSwitch.addEventListener(new OpenFlowEventListenerAdapter());
-    }
-
-    /**
-     * Tests a packet out operation.
-     */
-    @Test
-    public void testPacketOut() {
-        OFMessage ofPacketOut = new MockOfPacketOut();
-        ofSwitch.sendMsg(ofPacketOut);
-        assertThat(executorService.submittedMessages(), hasSize(1));
-        assertThat(executorService.submittedMessages().get(0), is(ofPacketOut));
-    }
-
-    /**
-     * Tests a flow mod operation.
-     */
-    @Test
-    public void testFlowMod() {
-        OFMessage ofFlowMod = new MockOfFlowMod();
-        ofSwitch.sendMsg(ofFlowMod);
-        assertThat(executorService.submittedMessages(), hasSize(1));
-        assertThat(executorService.submittedMessages().get(0), is(ofFlowMod));
-    }
-
-    /**
-     * Tests a stats request operation.
-     */
-    @Test
-    public void testStatsRequest() {
-        OFMessage ofStatsRequest = new MockOfStatsRequest();
-        ofSwitch.sendMsg(ofStatsRequest);
-        assertThat(executorService.submittedMessages(), hasSize(1));
-        assertThat(executorService.submittedMessages().get(0), is(ofStatsRequest));
-    }
-
-    protected class OpenFlowSwitchImpl extends AbstractOpenFlowSwitch {
-
-        @Override
-        public Boolean supportNxRole() {
-            return null;
-        }
-
-        @Override
-        public void startDriverHandshake() {
-        }
-
-        @Override
-        public boolean isDriverHandshakeComplete() {
-            return false;
-        }
-
-        @Override
-        public void processDriverHandshakeMessage(OFMessage m) {
-        }
-    }
-
-    private class OpenFlowEventListenerAdapter implements OpenFlowEventListener {
-
-        @Override
-        public void handleMessage(Dpid dpid, OFMessage msg) {
-        }
-    }
-
-    private class MockChannel implements Channel {
-
-        @Override
-        public Integer getId() {
-            return null;
-        }
-
-        @Override
-        public ChannelFactory getFactory() {
-            return null;
-        }
-
-        @Override
-        public Channel getParent() {
-            return null;
-        }
-
-        @Override
-        public ChannelConfig getConfig() {
-            return null;
-        }
-
-        @Override
-        public ChannelPipeline getPipeline() {
-            return null;
-        }
-
-        @Override
-        public boolean isOpen() {
-            return false;
-        }
-
-        @Override
-        public boolean isBound() {
-            return false;
-        }
-
-        @Override
-        public boolean isConnected() {
-            // we assume that the channel is connected
-            return true;
-        }
-
-        @Override
-        public SocketAddress getLocalAddress() {
-            return null;
-        }
-
-        @Override
-        public SocketAddress getRemoteAddress() {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture write(Object message) {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture write(Object message, SocketAddress remoteAddress) {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture bind(SocketAddress localAddress) {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture connect(SocketAddress remoteAddress) {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture disconnect() {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture unbind() {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture close() {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture getCloseFuture() {
-            return null;
-        }
-
-        @Override
-        public int getInterestOps() {
-            return 0;
-        }
-
-        @Override
-        public boolean isReadable() {
-            return false;
-        }
-
-        @Override
-        public boolean isWritable() {
-            return false;
-        }
-
-        @Override
-        public ChannelFuture setInterestOps(int interestOps) {
-            return null;
-        }
-
-        @Override
-        public ChannelFuture setReadable(boolean readable) {
-            return null;
-        }
-
-        @Override
-        public boolean getUserDefinedWritability(int index) {
-            return false;
-        }
-
-        @Override
-        public void setUserDefinedWritability(int index, boolean isWritable) {
-
-        }
-
-        @Override
-        public Object getAttachment() {
-            return null;
-        }
-
-        @Override
-        public void setAttachment(Object attachment) {
-
-        }
-
-        @Override
-        public int compareTo(Channel o) {
-            return 0;
-        }
-    }
-}
diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/ExecutorServiceAdapter.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/ExecutorServiceAdapter.java
deleted file mode 100644
index a50db99..0000000
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/ExecutorServiceAdapter.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2015-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.openflow.controller.driver;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-/**
- * Test harness adapter for the ExecutorService.
- */
-public class ExecutorServiceAdapter  implements ExecutorService {
-    @Override
-    public void shutdown() {
-
-    }
-
-    @Override
-    public List<Runnable> shutdownNow() {
-        return null;
-    }
-
-    @Override
-    public boolean isShutdown() {
-        return false;
-    }
-
-    @Override
-    public boolean isTerminated() {
-        return false;
-    }
-
-    @Override
-    public boolean awaitTermination(long timeout, TimeUnit unit)
-            throws InterruptedException {
-        return false;
-    }
-
-    @Override
-    public <T> Future<T> submit(Callable<T> task) {
-        return null;
-    }
-
-    @Override
-    public <T> Future<T> submit(Runnable task, T result) {
-        return null;
-    }
-
-    @Override
-    public Future<?> submit(Runnable task) {
-        return null;
-    }
-
-    @Override
-    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
-            throws InterruptedException {
-        return null;
-    }
-
-    @Override
-    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
-            throws InterruptedException {
-        return null;
-    }
-
-    @Override
-    public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException {
-        return null;
-    }
-
-    @Override
-    public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
-            throws InterruptedException, ExecutionException, TimeoutException {
-        return null;
-    }
-
-    @Override
-    public void execute(Runnable command) {
-
-    }
-}
diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfFlowMod.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfFlowMod.java
deleted file mode 100644
index 27b356f..0000000
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfFlowMod.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2015-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.openflow.controller.driver;
-
-
-import org.projectfloodlight.openflow.protocol.OFFlowMod;
-import org.projectfloodlight.openflow.protocol.OFFlowModCommand;
-import org.projectfloodlight.openflow.protocol.OFType;
-import org.projectfloodlight.openflow.protocol.OFFlowModFlags;
-import org.projectfloodlight.openflow.protocol.action.OFAction;
-import org.projectfloodlight.openflow.protocol.instruction.OFInstruction;
-import org.projectfloodlight.openflow.protocol.match.Match;
-import org.projectfloodlight.openflow.types.OFBufferId;
-import org.projectfloodlight.openflow.types.OFPort;
-import org.projectfloodlight.openflow.types.TableId;
-import org.projectfloodlight.openflow.types.U64;
-import org.projectfloodlight.openflow.types.OFGroup;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * Mock of the Open Flow flow mod message.
- */
-public class MockOfFlowMod extends OfMessageAdapter implements OFFlowMod {
-
-    public MockOfFlowMod() {
-        super(OFType.FLOW_MOD);
-    }
-
-    @Override
-    public U64 getCookie() {
-        return null;
-    }
-
-    @Override
-    public U64 getCookieMask() throws UnsupportedOperationException {
-        return null;
-    }
-
-    @Override
-    public TableId getTableId() throws UnsupportedOperationException {
-        return null;
-    }
-
-    @Override
-    public OFFlowModCommand getCommand() {
-        return null;
-    }
-
-    @Override
-    public int getIdleTimeout() {
-        return 0;
-    }
-
-    @Override
-    public int getHardTimeout() {
-        return 0;
-    }
-
-    @Override
-    public int getPriority() {
-        return 0;
-    }
-
-    @Override
-    public OFBufferId getBufferId() {
-        return null;
-    }
-
-    @Override
-    public OFPort getOutPort() {
-        return null;
-    }
-
-    @Override
-    public OFGroup getOutGroup() throws UnsupportedOperationException {
-        return null;
-    }
-
-    @Override
-    public Set<OFFlowModFlags> getFlags() {
-        return null;
-    }
-
-    @Override
-    public Match getMatch() {
-        return null;
-    }
-
-    @Override
-    public List<OFInstruction> getInstructions() throws UnsupportedOperationException {
-        return null;
-    }
-
-    @Override
-    public List<OFAction> getActions() throws UnsupportedOperationException {
-        return null;
-    }
-
-    @Override
-    public OFFlowMod.Builder createBuilder() {
-        return null;
-    }
-}
diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfPacketOut.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfPacketOut.java
deleted file mode 100644
index a945950..0000000
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfPacketOut.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2015-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.openflow.controller.driver;
-
-import org.projectfloodlight.openflow.protocol.OFPacketOut;
-import org.projectfloodlight.openflow.protocol.OFType;
-import org.projectfloodlight.openflow.protocol.action.OFAction;
-import org.projectfloodlight.openflow.types.OFBufferId;
-import org.projectfloodlight.openflow.types.OFPort;
-
-import java.util.List;
-
-/**
- * Mock of the Open Flow packet out message.
- */
-public class MockOfPacketOut extends OfMessageAdapter implements OFPacketOut {
-
-    public MockOfPacketOut() {
-        super(OFType.PACKET_OUT);
-    }
-
-    @Override
-    public OFBufferId getBufferId() {
-        return null;
-    }
-
-    @Override
-    public OFPort getInPort() {
-        return null;
-    }
-
-    @Override
-    public List<OFAction> getActions() {
-        return null;
-    }
-
-    @Override
-    public byte[] getData() {
-        return new byte[0];
-    }
-
-    @Override
-    public OFPacketOut.Builder createBuilder() {
-        return null;
-    }
-}
diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfStatsRequest.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfStatsRequest.java
deleted file mode 100644
index 2eafec8..0000000
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/MockOfStatsRequest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2015-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.openflow.controller.driver;
-
-
-
-import org.projectfloodlight.openflow.protocol.OFStatsRequest;
-import org.projectfloodlight.openflow.protocol.OFStatsType;
-import org.projectfloodlight.openflow.protocol.OFType;
-import org.projectfloodlight.openflow.protocol.OFStatsReplyFlags;
-
-import java.util.Set;
-
-/**
- * Mock of the Open Flow stats request message.
- */
-public class MockOfStatsRequest extends OfMessageAdapter implements OFStatsRequest {
-
-    public MockOfStatsRequest() {
-        super(OFType.STATS_REQUEST);
-    }
-
-    @Override
-    public OFStatsType getStatsType() {
-        return null;
-    }
-
-    @Override
-    public Set<OFStatsReplyFlags> getFlags() {
-        return null;
-    }
-
-    @Override
-    public OFStatsRequest.Builder createBuilder() {
-        return null;
-    }
-}
diff --git a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/OfMessageAdapter.java b/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/OfMessageAdapter.java
deleted file mode 100644
index df6d855..0000000
--- a/protocols/openflow/api/src/test/java/org/onosproject/openflow/controller/driver/OfMessageAdapter.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2015-present Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.openflow.controller.driver;
-
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.projectfloodlight.openflow.protocol.OFMessage;
-import org.projectfloodlight.openflow.protocol.OFType;
-import org.projectfloodlight.openflow.protocol.OFVersion;
-
-import com.google.common.hash.PrimitiveSink;
-
-/**
- * Adapter for testing against an OpenFlow message.
- */
-public class OfMessageAdapter implements OFMessage {
-    OFType type;
-
-    private OfMessageAdapter() {}
-
-    public OfMessageAdapter(OFType type) {
-        this.type = type;
-    }
-
-    @Override
-    public OFType getType() {
-        return type;
-    }
-
-    @Override
-    public OFVersion getVersion() {
-        return null;
-    }
-
-    @Override
-    public long getXid() {
-        return 0;
-    }
-
-    @Override
-    public void writeTo(ChannelBuffer channelBuffer) { }
-
-    @Override
-    public Builder createBuilder() {
-        return null;
-    }
-
-    @Override
-    public void putTo(PrimitiveSink sink) { }
-}
