public static byte[] decodeBytes(String bech32, String expectedHrp, Encoding expectedEncoding) {
        Bech32.Bech32Data decoded = decode(bech32);
        if (!decoded.hrp.equals(expectedHrp) || decoded.encoding != expectedEncoding) {
            throw new AddressFormatException("unexpected hrp or encoding");
        }
        return decoded.decode5to8();
    }
@Test
    @Parameters(method = "nip19Vectors")
    public void decodeBytes(String expectedHex, String hrp, String bech32) {
        Bech32.Bech32Data decoded = Bech32.decode(bech32);
        String decodedData = ByteUtils.formatHex(decoded.decode5to8());

        assertEquals("incorrect encoding type", Bech32.Encoding.BECH32, decoded.encoding);
        assertEquals("incorrect hrp", hrp, decoded.hrp);
        assertEquals("incorrect decoded data", expectedHex, decodedData);
    }