public String url(String text) {
        if (text == null || text.isEmpty()) {
            return text;
        }
        try {
            return URLEncoder.encode(text, UTF_8.name());
        } catch (UnsupportedEncodingException ex) {
            LOGGER.warn("UTF-8 is not supported?");
            LOGGER.info("", ex);
        }
        return "";
    }
@Test
    public void testUrl() {
        String text = null;
        EscapeTool instance = new EscapeTool();
        String expResult = null;
        String result = instance.url(text);
        assertEquals(expResult, result);

        text = "";
        expResult = "";
        result = instance.url(text);
        assertEquals(expResult, result);

        text = " ";
        expResult = "+";
        result = instance.url(text);
        assertEquals(expResult, result);
    }