use of org.graylog2.plugin.IOState in project graylog2-server by Graylog2.
the class IOStateTest method testNotEqualIfDifferentState.
@Test
public void testNotEqualIfDifferentState() throws Exception {
EventBus eventBus = mock(EventBus.class);
MessageInput messageInput = mock(MessageInput.class);
IOState<MessageInput> inputState1 = new IOState<>(eventBus, messageInput, IOState.Type.RUNNING);
IOState<MessageInput> inputState2 = new IOState<>(eventBus, messageInput, IOState.Type.STOPPED);
assertTrue(inputState1.equals(inputState2));
assertTrue(inputState2.equals(inputState1));
}
use of org.graylog2.plugin.IOState in project graylog2-server by Graylog2.
the class IOStateTest method testEqualsSameState.
@Test
public void testEqualsSameState() throws Exception {
EventBus eventBus = mock(EventBus.class);
MessageInput messageInput = mock(MessageInput.class);
IOState<MessageInput> inputState1 = new IOState<>(eventBus, messageInput, IOState.Type.RUNNING);
IOState<MessageInput> inputState2 = new IOState<>(eventBus, messageInput, IOState.Type.RUNNING);
assertTrue(inputState1.equals(inputState2));
assertTrue(inputState2.equals(inputState1));
}
Aggregations