### Question:
AllowedMechanisms { public static AllowedMechanisms fromBinaryEncoding(final byte[] binary) throws IllegalArgumentException { final ArrayList<Long> mechs = new ArrayList<>(); try { final LongBuffer lb = ByteBuffer.wrap(binary).order(ByteOrder.LITTLE_ENDIAN).asLongBuffer(); while (lb.hasRemaining()) { mechs.add(lb.get()); } } catch (BufferUnderflowException ex) { throw new IllegalArgumentException("Unable to parse allowed mechanisms value: " + ex.getMessage()); } return new AllowedMechanisms(mechs); } AllowedMechanisms(List<Long> mechs); static AllowedMechanisms parse(final String allowedMechanismsProperty); static AllowedMechanisms fromBinaryEncoding(final byte[] binary); byte[] toBinaryEncoding(); Long[] toLongArray(); String toPropertyValue(); @Override String toString();  }### Answer:
@Test public void testFromBinaryEncoding() { LOG.info(">testFromBinaryEncoding"); final Long[] expected = new Long[] { 0x00000040l, 0x00000000l, 0x00000250l, 0x252l, 624l, 0x81234567l }; final String binary = "4000000000000000" + "0000000000000000" + "5002000000000000" + "5202000000000000" + "7002000000000000" + "6745238100000000"; assertArrayEquals(expected, AllowedMechanisms.fromBinaryEncoding(Hex.decode(binary)).toLongArray()); }