File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/codec/binary Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,11 +437,23 @@ public void testEncodeHexByteBufferHelloWorldUpperCaseHex() {
437437 }
438438
439439 @ Test
440- public void testEncodeHexByteBufferZeroes () {
440+ public void testEncodeHex_ByteBufferOfZeroes () {
441441 final char [] c = Hex .encodeHex (ByteBuffer .allocate (36 ));
442442 assertEquals ("000000000000000000000000000000000000000000000000000000000000000000000000" , new String (c ));
443443 }
444444
445+ @ Test
446+ public void testEncodeHexByteString_ByteBufferOfZeroes () {
447+ final String c = Hex .encodeHexString (ByteBuffer .allocate (36 ));
448+ assertEquals ("000000000000000000000000000000000000000000000000000000000000000000000000" , c );
449+ }
450+
451+ @ Test
452+ public void testEncodeHexByteString_ByteArrayOfZeroes () {
453+ final String c = Hex .encodeHexString (new byte [36 ]);
454+ assertEquals ("000000000000000000000000000000000000000000000000000000000000000000000000" , c );
455+ }
456+
445457 @ Test
446458 public void testEncodeStringEmpty () throws EncoderException {
447459 assertTrue (Arrays .equals (new char [0 ], (char []) new Hex ().encode ("" )));
You can’t perform that action at this time.
0 commit comments