public ArtifactResponse buildArtifactResponse(ArtifactResolveRequest artifactResolveRequest, String entityId, SignType signType) throws InstantiationException, ValidationException, ArtifactBuildException, BvdException {
        final var artifactResponse = OpenSAMLUtils.buildSAMLObject(ArtifactResponse.class);
        final var status = OpenSAMLUtils.buildSAMLObject(Status.class);
        final var statusCode = OpenSAMLUtils.buildSAMLObject(StatusCode.class);
        final var issuer = OpenSAMLUtils.buildSAMLObject(Issuer.class);

        return ArtifactResponseBuilder
                .newInstance(artifactResponse)
                .addID()
                .addIssueInstant()
                .addInResponseTo(artifactResolveRequest.getArtifactResolve().getID())
                .addStatus(StatusBuilder
                        .newInstance(status)
                        .addStatusCode(statusCode, StatusCode.SUCCESS)
                        .build())
                .addIssuer(issuer, entityId)
                .addMessage(buildResponse(artifactResolveRequest, entityId, signType))
                .addSignature(signatureService, signType)
                .build();
    }
@Test
    void parseArtifactResolveFailed() throws ValidationException, SamlParseException, ArtifactBuildException, BvdException, InstantiationException {
        ArtifactResponse artifactResponse = artifactResponseService.buildArtifactResponse(getArtifactResolveRequest("failed", true,false, SAML_COMBICONNECT, EncryptionType.BSN, ENTRANCE_ENTITY_ID), ENTRANCE_ENTITY_ID, TD);

        assertEquals("urn:oasis:names:tc:SAML:2.0:status:Responder", ((Response) artifactResponse.getMessage()).getStatus().getStatusCode().getValue());
        assertEquals("urn:oasis:names:tc:SAML:2.0:status:RequestDenied", ((Response) artifactResponse.getMessage()).getStatus().getStatusCode().getStatusCode().getValue());
    }