@Test
public void testPartialBufferVerification() throws Exception
{

    Signer signer = factory.getInstance(true, privateKey);
    byte[] source = new byte[text.length * 2];
    System.arraycopy(text, 0, source, text.length - 10, text.length);
    byte[] signature = signer.generate(source, text.length - 10, text.length);
    byte[] sign = new byte[signature.length * 2];
    System.arraycopy(signature, 0, sign, signature.length - 5, signature.length);
    Signer verifier = factory.getInstance(true, publicKey);
    assertTrue(
        verifier.verify(sign, signature.length - 5, signature.length, source, text.length - 10, text.length));
}