@Test
    void verifyResponse() throws Throwable {
        val map = new LinkedHashMap<String, InterruptResponse>();
        var response = new InterruptResponse("Message",
            CollectionUtils.wrap("text", "link", "text2", "link2"), false, true);
        response.setData(CollectionUtils.wrap("field1", List.of("value1", "value2"),
            "field2", List.of("value3", "value4")));
        map.put("casuser", response);

        val f = File.createTempFile("interrupt", "json");
        MAPPER.writer().withDefaultPrettyPrinter().writeValue(f, map);
        assertTrue(f.exists());

        val inquirer = new JsonResourceInterruptInquirer(new FileSystemResource(f));
        response = inquirer.inquire(CoreAuthenticationTestUtils.getAuthentication("unknown"),
            CoreAuthenticationTestUtils.getRegisteredService(),
            CoreAuthenticationTestUtils.getService(),
            CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword(),
            new MockRequestContext());
        assertFalse(response.isInterrupt());

        response = inquirer.inquire(CoreAuthenticationTestUtils.getAuthentication("casuser"),
            CoreAuthenticationTestUtils.getRegisteredService(),
            CoreAuthenticationTestUtils.getService(),
            CoreAuthenticationTestUtils.getCredentialsWithSameUsernameAndPassword(),
            new MockRequestContext());
        assertNotNull(response);
        assertFalse(response.isBlock());
        assertTrue(response.isSsoEnabled());
        assertEquals(2, response.getLinks().size());
        assertTrue(response.getData().containsKey("field1"));
        assertTrue(response.getData().containsKey("field2"));

        inquirer.destroy();
    }
This is {@link JsonResourceInterruptInquirerTests}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-interrupt-core/src/test/java/org/apereo/cas/interrupt/JsonResourceInterruptInquirerTests.java