public void testSizeBasedLegacyPattern() {
LogWriter lw = new LogWriter("foo","target/foo", 5, "4k");
Appender<ILoggingEvent> a = createappender(lw);
assertInstanceOf(a, SlingRollingFileAppender.class);
SlingRollingFileAppender sr = (SlingRollingFileAppender) a;
assertInstanceOf(sr.getTriggeringPolicy(), SizeBasedTriggeringPolicy.class);
assertInstanceOf(sr.getRollingPolicy(), FixedWindowRollingPolicy.class);
SizeBasedTriggeringPolicy sbtp = (SizeBasedTriggeringPolicy) sr.getTriggeringPolicy();
FixedWindowRollingPolicy fwRp = (FixedWindowRollingPolicy) sr.getRollingPolicy();
assertEquals(5, fwRp.getMaxIndex());
assertEquals(String.valueOf(4 * FileUtils.ONE_KB), sbtp.getMaxFileSize());
}