@@ -0,0 +1,2479 @@
+package com.clescot.webappender.formatter;%0A%0Aimport ch.qos.logback.classic.Level;%0Aimport ch.qos.logback.classic.Logger;%0Aimport ch.qos.logback.classic.spi.ILoggingEvent;%0Aimport ch.qos.logback.classic.spi.LoggingEvent;%0Aimport com.clescot.webappender.Row;%0Aimport com.google.common.collect.Lists;%0Aimport org.hamcrest.MatcherAssert;%0Aimport org.json.JSONObject;%0Aimport org.junit.Test;%0Aimport org.junit.experimental.runners.Enclosed;%0Aimport org.junit.runner.RunWith;%0Aimport org.slf4j.LoggerFactory;%0Aimport uk.co.datumedge.hamcrest.json.SameJSONAs;%0A%0Aimport java.util.List;%0A%0Aimport static org.fest.assertions.Assertions.assertThat;%0A%0A@RunWith(Enclosed.class)%0Apublic class FireLoggerFormatterTest %7B%0Aprivate static Logger LOGGER = (Logger) LoggerFactory.getLogger(FireLoggerFormatterTest.class);%0A    public static class Test_getJSON%7B%0A%0A        public static final String EMPTY_JSON_OBJECT = %22%7B%7D%22;%0A%0A        @Test%0A        public void test_no_rows() throws Exception %7B%0A            //given%0A            FireLoggerFormatter fireLoggerFormatter = new FireLoggerFormatter();%0A            List%3CRow%3E rows = Lists.newArrayList();%0A            //when%0A            String json = fireLoggerFormatter.getJSON(rows);%0A%0A            //then%0A            assertThat(json).isEqualTo(EMPTY_JSON_OBJECT);%0A%0A        %7D%0A%0A        @Test%0A        public void test_one_row() throws Exception %7B%0A            //given%0A            FireLoggerFormatter fireLoggerFormatter = new FireLoggerFormatter();%0A            List%3CRow%3E rows = Lists.newArrayList();%0A            ILoggingEvent iLoggingEvent = new LoggingEvent(FireLoggerFormatterTest.class.getName(),LOGGER, Level.INFO,%22test message%22,null,new Object%5B%5D%7B%7D);%0A%0A            Row row = new Row(iLoggingEvent);%0A            rows.add(row);%0A            //when%0A            String json = fireLoggerFormatter.getJSON(rows);%0A            String expected = %22%7B%5C%22logs%5C%22:%5B%7B%5C%22name%5C%22:%5C%22com.clescot.webappender.formatter.FireLoggerFormatterTest%5C%22,%5C%22contextName%5C%22:null,%5C%22pathName%5C%22:null,%5C%22args%5C%22:%5B%5D,%5C%22callerData%5C%22:null,%5C%22classOfCaller%5C%22:null,%5C%22methodOfCaller%5C%22:null,%5C%22lineno%5C%22:null,%5C%22marker%5C%22:null,%5C%22relativeTime%5C%22:null,%5C%22time%5C%22:null,%5C%22template%5C%22:%5C%22test message%5C%22,%5C%22message%5C%22:%5C%22test message%5C%22,%5C%22threadName%5C%22:null,%5C%22throwableProxy%5C%22:null,%5C%22level%5C%22:%5C%22info%5C%22,%5C%22mdc%5C%22:null%7D%5D%7D%22;%0A            //then%0A            MatcherAssert.assertThat(new JSONObject(json), SameJSONAs.sameJSONObjectAs(new JSONObject(expected)).allowingExtraUnexpectedFields()%0A                    .allowingAnyArrayOrdering());%0A        %7D%0A%0A    %7D%0A%0A%0A%7D%0A

add tests