@Test
public void testInlineStyles() throws PlatformInitializationException {

  final Map<Object, Object> configMap = new HashMap<>();
  final MasterReport report = mock( MasterReport.class );
  final ModifiableConfiguration configuration = mock( ModifiableConfiguration.class );
  doAnswer( i -> configMap.put( i.getArguments()[ 0 ], i.getArguments()[ 1 ] ) ).when( configuration )
    .setConfigProperty( any(), any() );
  when( report.getConfiguration() ).thenReturn( configuration );
  MicroPlatform microPlatform = MicroPlatformFactory.create();
  microPlatform.start();
  ClassicEngineBoot.getInstance().start();
  ReportListenerThreadHolder.clear();
  try {
    emailOutput.generate( report, 1, new ByteArrayOutputStream(), 1 );
  } catch ( final Exception ignored ) {
  } finally {
    assertEquals( configMap.get( HtmlTableModule.INLINE_STYLE ),
      "true" );
    assertEquals(
      configMap.get( HtmlTableModule.EXTERNALIZE_STYLE ), "false" );
    assertEquals(
      configMap.get( "org.pentaho.reporting.engine.classic.core.modules.output.table.html.RotatedTextAsImages" ),
      "true" );
    microPlatform.stop();
    microPlatform = null;
  }
}