### Question:
TextCategorizer { public String categorize(String text, int limit) { if(limit > (text.length()-1)) { limit=text.length()-1; } return this.categorize(text.substring(0,limit)); } TextCategorizer();  TextCategorizer(String conf_file_path); String categorize(String text, int limit); String categorize(String text);  }### Answer:
@Test public void testCategorize_String_int() { System.out.println("categorize"); TextCategorizer instance = new TextCategorizer(); assertEquals("en", instance.categorize("This is a test for English, should return that language. No problem with this, which is ok.", 25)); assertEquals("es", instance.categorize("Esto es una prueba para el Español, no falla, es castellano. Además se nota.", 15)); }
@Test public void testCategorize_String() { System.out.println("categorize"); TextCategorizer instance = new TextCategorizer(); assertEquals("en", instance.categorize("This is a test for English, should return that language. No problem with this, which is ok.")); assertEquals("es", instance.categorize("Esto es una prueba para el Español, no falla, es castellano.")); }