ParserUtils { public static String unquote(String quoted) { String result = quoted; if (quoted != null) { if (quoted.startsWith("\"") && quoted.endsWith("\"")) { result = quoted.substring(1, quoted.length() - 1); } else if (quoted.startsWith("'") && quoted.endsWith("'")) { result = quoted.substring(1, quoted.length() - 1); } } return result; }  static long getSize(String args); static String unquote(String quoted);  }
@Test public void unquoteShouldReturnNullOnNullInput() { assertThat(ParserUtils.unquote(null)).isEqualTo(null); }
@Test public void unquoteShouldReturnEmptyStringOnEmptyInput() { assertThat(ParserUtils.unquote("")).isEqualTo(""); }
@Test public void unquoteShouldNotUnquoteUnquotedQuotes() { assertThat(ParserUtils.unquote("a")).isEqualTo("a"); }
@Test public void unquoteShouldNotUnquoteNonStartingQuotes() { assertThat(ParserUtils.unquote("a\"")).isEqualTo("a\""); }
@Test public void unquoteShouldNotUnquoteNonEndingQuotes() { assertThat(ParserUtils.unquote("\"a")).isEqualTo("\"a"); }
@Test public void unquoteShouldNotUnquoteQuotesThatDoNotEnglobeWallString() { assertThat(ParserUtils.unquote("a\"b\"c")).isEqualTo("a\"b\"c"); }
@Test public void unquoteShouldNotUnquoteQuotesThatDoNotEnglobeWallString1() { assertThat(ParserUtils.unquote("\"b\"c")).isEqualTo("\"b\"c"); }
@Test public void unquoteShouldNotUnquoteQuotesThatDoNotEnglobeWallString2() { assertThat(ParserUtils.unquote("a\"b\"")).isEqualTo("a\"b\""); }
@Test public void unquoteShouldWorkWithDoubleQuote() { assertThat(ParserUtils.unquote("\"a\"")).isEqualTo("a"); }
@Test public void unquoteShouldNotUnquoteNonTrimmedData() { assertThat(ParserUtils.unquote(" \"a\"")).isEqualTo(" \"a\""); }
@Test public void unquoteShouldManageSingleQuotes() { assertThat(ParserUtils.unquote("a'")).isEqualTo("a'"); }
@Test public void unquoteShouldManageSingleQuotes1() { assertThat(ParserUtils.unquote("'a")).isEqualTo("'a"); }
@Test public void unquoteShouldManageSingleQuotes2() { assertThat(ParserUtils.unquote("a'b")).isEqualTo("a'b"); }
@Test public void unquoteShouldWorkWithSingleQuotes() { assertThat(ParserUtils.unquote("'a'")).isEqualTo("a"); }