PackageList { @Nonnull static String removeQuotes(@Nonnull final String text) { String result = text; if (text.length() > 1 && text.startsWith("\"") && text.endsWith("\"")) { result = text.substring(1, text.length() - 1); } return result; } PackageList(@Nonnull @MustNotContainNull final File file, @Nonnull final String text, @Nonnull final ContentProvider contentProvider); @Nonnull @MustNotContainNull List<Package> getPackages();  }
@Test public void testRemoveQuotes() { assertEquals("", PackageList.removeQuotes("")); assertEquals("\"", PackageList.removeQuotes("\"")); assertEquals("", PackageList.removeQuotes("\"\"")); assertEquals("a", PackageList.removeQuotes("\"a\"")); assertEquals("a\"", PackageList.removeQuotes("a\"")); assertEquals("\"", PackageList.removeQuotes("\"\"\"")); }