@Test
public void hasMessageShouldThrowExceptionIfKeyIsEmpty() {

    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("Key can not be empty");
    messages.hasMessage(" ");
}