### Question:
RedPenService { public RedPen getRedPen(String lang) { return redPens.getOrDefault(lang, redPens.get(DEFAULT_LANGUAGE)); } RedPenService(ServletContext context); RedPen getRedPen(String lang); RedPen getRedPenFromJSON(JSONObject requestJSON); RedPen getRedPen(String lang, Map<String, Map<String, String>> validatorProperties); Map<String, RedPen> getRedPens(); static String getOrDefault(JSONObject json, String property, String defaultValue);  }### Answer:
@Test void canSpecifyDifferentDefaultConfiguration() throws Exception { MockServletContext context = new MockServletContext(); context.addInitParameter("redpen.conf.path", "/conf/redpen-conf-ru.xml"); RedPen defaultRedPen = new RedPenService(context).getRedPen("default"); assertEquals("ru", defaultRedPen.getConfiguration().getKey()); assertTrue(defaultRedPen.getConfiguration().isSecure()); }
@Test void redPensWithCustomPropertiesAreAlsoSecure() throws Exception { RedPen en = new RedPenService(null).getRedPen("en", emptyMap()); assertTrue(en.getConfiguration().isSecure()); }