    @Test
    public void test() throws IOException {

        String text = getResourceText("Script.groovy");
        String preview = StringUtils.getPreview(text, 2, true, Integer.MAX_VALUE);
        assertEquals("package com.icthh.xm.lep.script\\n\\ndef description = \"'Logic Extension Point 2017'\"", preview);

        preview = StringUtils.getPreview(text, 2, false, Integer.MAX_VALUE);
        assertEquals("package com.icthh.xm.lep.script\\n", preview);
    }