@SuppressWarnings("all")
    public <T> T searchStateValue(String stateName, T defaultValue) {
        T result = null;
        for (ModuleState each : getAllModuleStates()) {
            if (each.getStates().containsKey(stateName)) {
                result = (T) each.getStates().get(stateName);
                break;
            }
        }
        return null == result ? defaultValue : result;
    }
@Test
    void testSearchStateValue() {
        assertEquals("test", ModuleStateHolder.getInstance().searchStateValue("test", "aaa"));
        assertEquals("aaa", ModuleStateHolder.getInstance().searchStateValue("non-exist", "aaa"));
    }