@Test
public void getStagingHandlerImpl() throws Exception {

  File tmp = new File( "target/test/resource/solution/system/tmp" );
  tmp.mkdirs();
  MicroPlatform microPlatform = MicroPlatformFactory.create();
  microPlatform.start();
  try {
    final StagingHandler handler1 =
      AbstractStagingHandler.getStagingHandlerImpl( null, null, StagingMode.THRU );
    assertTrue( handler1 instanceof ThruStagingHandler );
    final StagingHandler handler2 =
      AbstractStagingHandler.getStagingHandlerImpl( null, null, StagingMode.MEMORY );
    assertTrue( handler2 instanceof MemStagingHandler );
    final StagingHandler handler3 =
      AbstractStagingHandler.getStagingHandlerImpl( null, new StandaloneSession( "test" ), StagingMode.TMPFILE );
    assertTrue( handler3 instanceof TempFileStagingHandler );
  } finally {
    microPlatform.stop();
    microPlatform = null;
  }
}