public String toSortedKeyValueString() {
            return nameAndCode.entrySet().stream()
                    .map((kv) -> kv.getKey() + " " + kv.getValue())
                    .collect(Collectors.joining("\n"));
        }
Test for ensuring that the definitions of error codes in Java match their
C++ implementation counterparts. Any new DocumentProtocol error codes must
also be added to this test.

@author vekterli
documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/ErrorCodesTest.java