assertArrayEquals(new String[]{"s1", "s2"}, array);
}
@Test
public void testWrongType() throws Exception {
final Configuration config = configurationFactory.getConfig(getFile(BASE_DIR + "config.yaml"));
PJsonObject requestData = loadJsonRequestData();
final JSONArray intArray = new JSONArray();
intArray.add(1);
intArray.add(2);
intArray.add(3);
requestData.getJSONObject("attributes").getInternalObj().put("stringarray", intArray);
Template template = config.getTemplate("main");
Values values = new Values(requestData, template, this.parser, config.getDirectory(), httpClientFactory, config.getDirectory());
String[] array = (String[]) values.getObject("stringarray", Object.class);
assertArrayEquals(new String[]{"1", "2", "3"}, array);
}