### Question:
CategoryStringGenerator { public static String getPostgresCategoryString(String searchString) { if (searchString == null || !(searchString.trim().length() > 0)) { return "{}"; } List<String> categories = parse(searchString.trim().toLowerCase()); return PostgreSQLTextArray.stringArrayToPostgreSQLTextArray(categories.toArray(new String[categories.size()])); } private  CategoryStringGenerator(); static String getPostgresCategoryString(String searchString);  }### Answer:
@Test public void shouldGenerateStringForSingleCategory() { String result = CategoryStringGenerator.getPostgresCategoryString(SINGLE_CAT); assertEquals(result, SINGLE_CAT_RESULT); }
@Test public void shouldGenerateStringForMulitpleCategories() { String result = CategoryStringGenerator.getPostgresCategoryString(MULTI_CAT); assertEquals(result, MULTI_CAT_RESULT); }