code:   public void test_SignedWithoutSignature() throws Exception {
      JWT inputJwt = new JWT()
          .setSubject("123456789")
          .setIssuedAt(ZonedDateTime.now(ZoneOffset.UTC))
          .setExpiration(ZonedDateTime.now(ZoneOffset.UTC).plusHours(2));
  
      String encodedJWT = JWT.getEncoder().encode(inputJwt, HMACSigner.newSHA256Signer("secret"));
      String encodedJWTNoSignature = encodedJWT.substring(0, encodedJWT.lastIndexOf('.') + 1);
  
      expectException(InvalidJWTSignatureException.class, () -> JWT.getDecoder().decode(encodedJWTNoSignature, HMACVerifier.newVerifier("secret")));
  
      // Also cannot be decoded even if the caller calls decode w/out a signature because the header still indicates a signature algorithm.
      expectException(InvalidJWTSignatureException.class, () -> JWT.getDecoder().decode(encodedJWTNoSignature));
    }
  
    @Test
  