class JsonHandler extends HandlerBase {

	protected JsonArrayBuilder showArray(int[] iarray) {
		JsonArrayBuilder aBuilder = Json.createArrayBuilder();
		for (int i : iarray) {
			aBuilder.add(i);
		}
		return aBuilder;
	}

}

class JsonHandlerTest {

	private static final Logger LOGGER;
	private static final String TIME_PATTERN;
	private static final String DATE_PATTERN;
	private static final String DATE_REPLACEMENT;
	private static final String RELEASE_PATTERN;
	private static final String RELEASE_REPLACEMENT;
	private static final String DIR_PATTERN;
	private static final String DIR_REPLACEMENT;
	private static final String CONF_PATTERN;
	private static final String CONF_REPLACEMENT;
	private static final String RIGHTS_PATTERN;
	private static final String RIGHTS_REPLACEMENT;
	private static final String VENDOR_PATTERN;
	private static final String VENDOR_REPLACEMENT;
	private static final String DUMMY;
	private static final String DUMMY_CK;
	private static final String APP_JSON;
	private static final String API_JSON;
	private static final String HANDLER_JSON;
	private static final String MODULE_JSON;
	private static final String INFO_JSON;
	private static final String FIND;
	private static App mockApp;
	private static JhoveBase je;
	private File outputFile;
	private StringWriter outString;
	private PrintWriter writer;
	private JsonHandler handler;

	@Test
	public void testShowArrayString() throws IOException {

		final String[] sArrayTest = { null, "", "DUMMY" };
		JsonArrayBuilder b = this.handler.showArray(sArrayTest);

		buildJson(b);
        handler.close();
        
		String result = outString.toString();
		LOGGER.info(FIND + result);
		final String expected = "{\"ARRAY\":[null,\"\",\"DUMMY\"]}";
		
	    assertEquals(expected, result);
	}

}