public static Map<String, Object> extractProperties(Map<String, Object> properties, String optionPrefix) {
        return extractProperties(properties, optionPrefix, true);
    }
@Test
    public void testExtractProperties() {
        Map<String, Object> params = new LinkedHashMap<>();
        params.put("foo.name", "Camel");
        params.put("foo.age", 5);
        params.put("bar", "yes");

        // extract all "foo." properties
        // and their keys should have the prefix removed
        Map<String, Object> foo = PropertiesHelper.extractProperties(params, "foo.", true);
        assertEquals(2, foo.size());
        assertEquals("Camel", foo.get("name"));
        assertEquals(5, foo.get("age"));

        // the extracted properties should be removed from original
        assertEquals(1, params.size());
        assertEquals("yes", params.get("bar"));
    }