@Test
public void testOnLogout() throws Exception {

  final MemorizeSchedulingLocationListener memorizeSchedulingLocationListener =
    new MemorizeSchedulingLocationListener();
  final PentahoAsyncExecutor.CompositeKey mock = mock( PentahoAsyncExecutor.CompositeKey.class );
  when( mock.isSameSession( "another" ) ).thenReturn( false );
  when( mock.isSameSession( "same" ) ).thenReturn( true );
  final String path = "test.prpt";
  memorizeSchedulingLocationListener.recordOutputFile( mock, path );
  assertEquals( path, memorizeSchedulingLocationListener.lookupOutputFile( mock ) );
  memorizeSchedulingLocationListener.onLogout( "another" );
  assertEquals( path, memorizeSchedulingLocationListener.lookupOutputFile( mock ) );
  memorizeSchedulingLocationListener.onLogout( "same" );
  assertNull( memorizeSchedulingLocationListener.lookupOutputFile( mock ) );
}