@Test public void errorsIfTargetClassPropertyIsEmpty() throws Exception { ContextBase contextBase = new ContextBase(); StatusManager statusManager = mock(StatusManager.class); contextBase.setStatusManager(statusManager); ExceptionConverter converter = newExceptionConverter(contextBase); converter.getContext() .putProperty(TARGET_CLASSES_PROPERTY_NAME, ""); ILoggingEvent loggingEvent = newErrorLoggingEvent(new TargetClass().blow()); converter.convert(loggingEvent); verify(statusManager).add(any(ErrorStatus.class)); }
@Override public String convert(final ILoggingEvent loggingEvent) { return Optional.ofNullable(loggingEvent) .map(this::getExceptionData) .orElse(NO_MSG); }
ExceptionConverter extends ClassicConverter { @Override public String convert(final ILoggingEvent loggingEvent) { return Optional.ofNullable(loggingEvent) .map(this::getExceptionData) .orElse(NO_MSG); } }
ExceptionConverter extends ClassicConverter { @Override public String convert(final ILoggingEvent loggingEvent) { return Optional.ofNullable(loggingEvent) .map(this::getExceptionData) .orElse(NO_MSG); }  }
ExceptionConverter extends ClassicConverter { @Override public String convert(final ILoggingEvent loggingEvent) { return Optional.ofNullable(loggingEvent) .map(this::getExceptionData) .orElse(NO_MSG); }  @Override String convert(final ILoggingEvent loggingEvent); }
ExceptionConverter extends ClassicConverter { @Override public String convert(final ILoggingEvent loggingEvent) { return Optional.ofNullable(loggingEvent) .map(this::getExceptionData) .orElse(NO_MSG); }  @Override String convert(final ILoggingEvent loggingEvent); static final String TARGET_CLASSES_PROPERTY_NAME; }