@Test
    public void testVerify_SHA256withDSA_Key_Success() throws Exception {
        TestUtils.assumeSHA2WithDSAAvailable();
        KeyFactory kf = KeyFactory.getInstance("DSA");
        DSAPublicKeySpec pubKeySpec = new DSAPublicKeySpec(DSA_pub, DSA_P, DSA_Q, DSA_G);
        PublicKey pubKey = kf.generatePublic(pubKeySpec);

        Signature sig = Signature.getInstance("SHA256withDSA");
        sig.initVerify(pubKey);
        sig.update(Vector2Data);
        assertTrue("Signature must verify correctly", sig.verify(SHA256withDSA_Vector2Signature));
    }
A possible signature using SHA256withDSA of Vector2Data. Note that DSS is
randomized, so this won't be the exact signature you'll get out of
another signing operation unless you use a fixed RNG.
common/src/test/java/org/conscrypt/java/security/SignatureTest.java