m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/pl/edu/mimuw/cloudatlas/agent/MockEventBus.java
blob: e8f8bfa3c8be36c3ceb48ce7697b6ff2e167f5aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package pl.edu.mimuw.cloudatlas.agent;

import java.util.concurrent.LinkedBlockingQueue;

import pl.edu.mimuw.cloudatlas.agent.messages.AgentMessage;

public class MockEventBus extends EventBus {
    public LinkedBlockingQueue<AgentMessage> events;

    public MockEventBus() {
        events = new LinkedBlockingQueue<AgentMessage>();
    }

    public void addMessage(AgentMessage msg) throws InterruptedException {
        events.put(msg);
    }
}