@Test public void testConversions() { test("key:soft", "key", false, false, "key:soft"); test("key:value:soft", "key:value", false, false, "key:value:soft"); test("!key:soft", "key", true, false, "!key:soft"); test("key:hard", "key", false, true, "key"); test("key:value:hard", "key:value", false, true, "key:value"); test("!key:hard", "key", true, true, "!key"); test("key", "key", false, true, "key"); test("key:value", "key:value", false, true, "key:value"); test("!key:value", "key:value", true, true, "!key:value"); test("key:hard:hard", "key:hard", false, true, "key:hard"); test("key:hard:soft", "key:hard", false, false, "key:hard:soft"); test("key:sOFt", "key", false, false, "key:soft"); test("key:VALUE:HARD", "key:VALUE", false, true, "key:VALUE"); test("key with space:value", "key with space:value", false, true, "key with space:value"); test("!key with space:value with space:soft", "key with space:value with space", true, false, "!key with space:value with space:soft"); test("!key:value with special chars?! wow!!:hard", "key:value with special chars?! wow!!", true, true, "!key:value with special chars?! wow!!"); test("!!key", "!key", true, true, "!!key"); }