@Test
public void testEscapeSingleQuotes()
{

    // Create a test vector with key=input and value=output values.
    LinkedHashMap<String, String> testVector = new LinkedHashMap<>();
    testVector.put("some text without single quotes", "some text without single quotes");
    testVector.put("'some \\'text\\' with single 'quotes'", "\\'some \\'text\\' with single \\'quotes\\'");
    testVector.put("'", "\\'");
    testVector.put("''''", "\\'\\'\\'\\'");
    testVector.put("'", "\\'");
    testVector.put("'\'\\'", "\\'\\'\\'");
    // Loop over all entries in the test vector.
    for (Object set : testVector.entrySet())
    {
        Map.Entry<?, ?> entry = (Map.Entry<?, ?>) set;
        assertEquals(entry.getValue(), hive13DdlGenerator.escapeSingleQuotes((String) entry.getKey()));
    }
}