@Override
    public String execute(CommandContext commandContext, String[] args) {
        if (commandContext.isHttp()) {
            Map<String, Object> result = new HashMap<>();
            result.put("warnedClasses", serializeCheckUtils.getWarnedClasses());
            return JsonUtils.toJson(result);
        } else {
            return "WarnedClasses: \n"
                    + serializeCheckUtils.getWarnedClasses().stream().sorted().collect(Collectors.joining("\n"))
                    + "\n\n";
        }
    }
@Test
    void test() {
        FrameworkModel frameworkModel = new FrameworkModel();

        SerializeSecurityManager ssm = frameworkModel.getBeanFactory().getBean(SerializeSecurityManager.class);

        SerializeWarnedClasses serializeWarnedClasses = new SerializeWarnedClasses(frameworkModel);

        CommandContext commandContext1 = Mockito.mock(CommandContext.class);
        Mockito.when(commandContext1.isHttp()).thenReturn(false);
        CommandContext commandContext2 = Mockito.mock(CommandContext.class);
        Mockito.when(commandContext2.isHttp()).thenReturn(true);

        Assertions.assertFalse(
                serializeWarnedClasses.execute(commandContext1, null).contains("Test1234"));
        Assertions.assertFalse(
                serializeWarnedClasses.execute(commandContext2, null).contains("Test1234"));
        ssm.getWarnedClasses().add("Test1234");
        Assertions.assertTrue(
                serializeWarnedClasses.execute(commandContext1, null).contains("Test1234"));
        Assertions.assertTrue(
                serializeWarnedClasses.execute(commandContext2, null).contains("Test1234"));

        Assertions.assertFalse(
                serializeWarnedClasses.execute(commandContext1, null).contains("Test4321"));
        Assertions.assertFalse(
                serializeWarnedClasses.execute(commandContext2, null).contains("Test4321"));
        ssm.getWarnedClasses().add("Test4321");
        Assertions.assertTrue(
                serializeWarnedClasses.execute(commandContext1, null).contains("Test4321"));
        Assertions.assertTrue(
                serializeWarnedClasses.execute(commandContext2, null).contains("Test4321"));

        frameworkModel.destroy();
    }