}
@Test
public void shouldRaiseErrorIfSendUsingLockedChat() {
properties.setStatus(ChatStatus.locked);
final ErrorTestHandler handler = new ErrorTestHandler();
chat.addErrorHandler(handler);
chat.send(new Message("body"));
assertTrue(handler.isCalledOnce());
assertEquals(ChatErrors.sendNotReady, handler.getLastEvent().getErrorType());
}