@Override
    public String toString() {
        StringBuilder sb = new StringBuilder("MergeResultMessage ");
        if (msgs == null) {
            return sb.toString();
        }
        for (AbstractMessage msg : msgs) { sb.append(msg.toString()).append("\n"); }
        return sb.toString();
    }
@Test
    public void testToString() {
        MergeResultMessage mergeResultMessage = new MergeResultMessage();

        assertEquals("MergeResultMessage ", mergeResultMessage.toString());

        RegisterRMResponse registerRMResponse = new RegisterRMResponse();
        registerRMResponse.setVersion("1");
        registerRMResponse.setIdentified(true);
        registerRMResponse.setResultCode(ResultCode.Failed);
        RegisterTMResponse registerTMResponse = new RegisterTMResponse();
        registerTMResponse.setVersion("2");
        registerTMResponse.setIdentified(true);
        registerTMResponse.setResultCode(ResultCode.Success);
        mergeResultMessage.msgs = new AbstractResultMessage[] {registerRMResponse, registerTMResponse};

        Assertions.assertEquals(
                "MergeResultMessage RegisterRMResponse{version='1', extraData='null', identified=true, resultCode=Failed, msg='null'}\nRegisterTMResponse{version='2', extraData='null', identified=true, resultCode=Success, msg='null'}\n",
                mergeResultMessage.toString()
        );
    }