@Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();

        sb.append("From ");
        if (ipSource != null) {
            sb.append(ipSource.getHostAddress());
            if (!send) {
                sb.append(", ");
                sb.append(id);
            }
        } else {
            sb.append("NULL");
        }
        sb.append(" to ");
        if (ipDestination != null) {
            sb.append(ipDestination.getHostAddress());
            if (send) {
                sb.append(", ");
                sb.append(id);
            }
        } else {
            sb.append("NULL");
        }
        sb.append(" on ");
        sb.append(time);
        sb.append(". Data - ");
        sb.append(nodeToString(data));
        if (accepted) {
            sb.append(". Was accepted with answer - ");
            sb.append(nodeToString(answer));
        } else {
            sb.append(". The message hasn't been accepted.");
        }

        return sb.toString();
    }