@Test
public void verifyOuWith4LevelHierarchyIsHandledCorrectly()
    throws SQLException
{

    // mock resultset data
    when( mockResultSet.getLong( "organisationunitid" ) ).thenReturn( 100L );
    when( mockResultSet.getString( "uid" ) ).thenReturn( "abcded" );
    when( mockResultSet.getString( "code" ) ).thenReturn( "ALFA" );
    when( mockResultSet.getString( "path" ) ).thenReturn( "/aaaa/bbbb/cccc/abcded" );
    when( mockResultSet.getInt( "hierarchylevel" ) ).thenReturn( 4 );
    // create event to import
    Event event = new Event();
    event.setUid( CodeGenerator.generateUid() );
    event.setOrgUnit( "abcded" );
    // mock resultset extraction
    mockResultSetExtractor( mockResultSet );
    Map<String, OrganisationUnit> map = subject.get( ImportOptions.getDefaultImportOptions(),
        Collections.singletonList( event ) );
    OrganisationUnit organisationUnit = map.get( event.getUid() );
    assertThat( organisationUnit, is( notNullValue() ) );
    assertThat( organisationUnit.getId(), is( 100L ) );
    assertThat( organisationUnit.getUid(), is( "abcded" ) );
    assertThat( organisationUnit.getCode(), is( "ALFA" ) );
    assertThat( organisationUnit.getPath(), is( "/aaaa/bbbb/cccc/abcded" ) );
    assertThat( organisationUnit.getHierarchyLevel(), is( 4 ) );
}