JAVA-1486 fix max/minkey typo and binary encoding and decoding test