@Override
    public void filter(final ContainerRequestContext requestContext,
                       ContainerResponseContext response) {
        final Object entity = response.getEntity();
        if (isEmptyOptional(entity)) {
            response.setStatus(Response.Status.NO_CONTENT.getStatusCode());
            response.setEntity(null);
        }
    }
@Test
    void doesNothingOnNoOptional() {
        doReturn(new Object()).when(response).getEntity();
        toTest.filter(requestContext, response);
        verifyNoMoreInteractions(response);
    }