### Question:
PasetoPublic { static String parse(byte[] publicKey, String signedMessage, String footer) throws SignatureException { Preconditions.checkNotNull(publicKey); Preconditions.checkNotNull(signedMessage); Preconditions.checkArgument(publicKey.length == 32, "Public key should be 32 bytes"); String[] tokenParts = signedMessage.split("\\."); if (!Strings.isNullOrEmpty(footer)) { Verify.verify(MessageDigest.isEqual(getUrlDecoder().decode(tokenParts[3]), footer.getBytes(UTF_8)), "footer does not match"); } Verify.verify(signedMessage.startsWith(PUBLIC), "Token should start with " + PUBLIC); byte[] sm = getUrlDecoder().decode(tokenParts[2]); byte[] signature = Arrays.copyOfRange(sm, sm.length - 64, sm.length); byte[] message = Arrays.copyOfRange(sm, 0, sm.length - 64); byte[] m2 = Util.pae(PUBLIC.getBytes(UTF_8), message, footer.getBytes(UTF_8)); verify(publicKey, m2, signature); return new String(message); } private  PasetoPublic();   }### Answer:
@Test public void invalidSignature() { byte[] publicKey = Util.hexToBytes("1eb9dbbbbc047c03fd70604e0071f0987e16b28b757225c11f00415d0e20b1a2"); assertThrows(SignatureException.class, () -> Paseto.parse(publicKey, "v2.public.RnJhbmsgRGVuaXMgcm9ja3O7MPuu90WKNyvBUUhAGFmi4PiPOr2bN2ytUSU-QWlj8eNefki2MubssfN1b8figynnY0WusRPwIQ-o0HSZOS0A.Q3VvbiBBbHBpbnVz", "Cuon Alpinus")); }