@Test
public void testCommentEscaping() {

    final String line1 = "hello this is a test with no comments";
    final String line2 = "# hello this is a comment";
    final String line3 = "hello this is a # trailing comment";
    // this should be picked up as a comment
    final String line4 = " \"hello\" this is an unquoted # \"hash\"";
    // this should NOT be picked up as a comment
    final String line5 = " hello this is a quoted \" # \"hash";
    final String line6 = " hello this is a quoted '#' hash";
    final String line7 = " \"hello\" this is a quoted '#' hash";
    final String line8 = " 'hello' this is a non 'quoted' #' hash";
    Assert.assertThat(FeatureFileParser.stripComments(line1), is("hello this is a test with no comments"));
    Assert.assertThat(FeatureFileParser.stripComments(line2), is(""));
    Assert.assertThat(FeatureFileParser.stripComments(line3), is("hello this is a"));
    Assert.assertThat(FeatureFileParser.stripComments(line4), is("\"hello\" this is an unquoted"));
    Assert.assertThat(FeatureFileParser.stripComments(line5), is("hello this is a quoted \" # \"hash"));
    Assert.assertThat(FeatureFileParser.stripComments(line6), is("hello this is a quoted '#' hash"));
    Assert.assertThat(FeatureFileParser.stripComments(line7), is("\"hello\" this is a quoted '#' hash"));
    Assert.assertThat(FeatureFileParser.stripComments(line8), is("'hello' this is a non 'quoted'"));
}