@Test
void testGenerateFIPS186_3()
{

    DSAKeyGenerationParameters params =
        (DSAKeyGenerationParameters) parameterGenerator.generate(
            new DSAKeyParametersGenerationParameters(256, 28, 1)
        );
    assertThat(params, not(nullValue()));
    assertThat(params.getP().bitLength(), equalTo(2048));
    assertThat(params.getQ().bitLength(), equalTo(224));
    AsymmetricKeyPair kp = generator.generate(params);
    assertThat(kp, not(nullValue()));
    assertThat(kp.getPrivate(), instanceOf(BcAsymmetricKeyParameters.class));
    assertThat(kp.getPublic(), instanceOf(BcAsymmetricKeyParameters.class));
    assertThat(((BcAsymmetricKeyParameters) kp.getPrivate()).getParameters(),
        instanceOf(DSAPrivateKeyParameters.class));
    assertThat(((BcAsymmetricKeyParameters) kp.getPublic()).getParameters(),
        instanceOf(DSAPublicKeyParameters.class));
    assertThat(
        ((DSAKeyParameters) ((BcAsymmetricKeyParameters) kp.getPrivate()).getParameters()).getParameters().getP()
            .bitLength(), equalTo(2048));
    assertThat(
        ((DSAKeyParameters) ((BcAsymmetricKeyParameters) kp.getPublic()).getParameters()).getParameters().getP()
            .bitLength(), equalTo(2048));
    assertThat(
        ((DSAKeyParameters) ((BcAsymmetricKeyParameters) kp.getPrivate()).getParameters()).getParameters().getQ()
            .bitLength(), equalTo(224));
    assertThat(
        ((DSAKeyParameters) ((BcAsymmetricKeyParameters) kp.getPublic()).getParameters()).getParameters().getQ()
            .bitLength(), equalTo(224));
}