@Override
    public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {
        responseContext.getHeaders().add(X_FRAME_OPTIONS, (httpAllowEmbedding ? EmbeddingOptions.SAMEORIGIN : EmbeddingOptions.DENY).toString());
    }
@Test
    void allowsEmbeddingForSameOriginIfConfigurationSettingIsTrue() throws IOException {
        final EmbeddingControlFilter filter = new EmbeddingControlFilter(true);

        final ContainerResponseContext responseContext = new ContainerResponse(requestContext, Response.ok().build());
        filter.filter(requestContext, responseContext);

        assertThat(responseContext.getHeaders())
                .containsEntry("X-Frame-Options", Collections.singletonList("SAMEORIGIN"));
    }