@Test
    void verifyOperation() throws Throwable {
        val converter = new CasYamlHttpMessageConverter();
        val outputMessage = new MockHttpOutputMessage();
        converter.write(getService(), MediaType.APPLICATION_JSON, outputMessage);
        assertNotNull(outputMessage.getBodyAsString());
        converter.write(List.of(getService()), MediaType.APPLICATION_JSON, outputMessage);
        assertNotNull(outputMessage.getBodyAsString());
        assertFalse(converter.canWrite(String.class, null));
        assertFalse(converter.canWrite(String.class, MediaType.APPLICATION_JSON));
        assertTrue(converter.canWrite(String.class, CasYamlHttpMessageConverter.MEDIA_TYPE_YAML));
    }
This is {@link CasYamlHttpMessageConverterTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-services-api/src/test/java/org/apereo/cas/services/CasYamlHttpMessageConverterTests.java