@Test
public void testSendPrivateMessage() throws CommandException {

    final String privmsg = "this is a private message";
    final String userIP = "192.168.5.155";
    final int userPort = 12345;
    final int userCode = 435435;
    final String message = "(" + userCode + ")" +
            "[" + settings.getOwnColor() + "]" +
            privmsg;
    final User user = new User("TestUser", userCode);
    user.setPrivateChatPort(userPort);
    user.setIpAddress(userIP);
    messages.sendPrivateMessage(privmsg, user);
    verify(service).sendMessageToUser(createMessage("PRIVMSG") + message, user);
}