@@ -0,0 +1,2193 @@
+/*%0A * Copyright 2016 JBoss, by Red Hat, Inc%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *       http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.uberfire.ext.apps.api;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.HashMap;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class DirectoryBreadCrumbTest %7B%0A%0A    private static final String TOP_DIR_NAME = %22top%22;%0A    private static final String MIDDLE_DIR_NAME = %22middle%22;%0A    private static final String LOW_DIR_NAME = %22low%22;%0A    private static final String OTHER_DIR_NAME = %22other%22;%0A%0A    @Test%0A    public void breadCrumbsOrderTest() %7B%0A        Directory topDir = new Directory( TOP_DIR_NAME, %22%22, %22%22, new HashMap%3CString, List%3CString%3E%3E() );%0A        Directory middleDir = new Directory( MIDDLE_DIR_NAME, %22%22, %22%22, topDir );%0A        Directory lowDir = new Directory( LOW_DIR_NAME, %22%22, %22%22, middleDir );%0A        Directory otherDir = new Directory( OTHER_DIR_NAME, %22%22, %22%22, topDir);%0A%0A        assertDirectoryBreadCrumbs( topDir, TOP_DIR_NAME );%0A        assertDirectoryBreadCrumbs( middleDir, TOP_DIR_NAME, MIDDLE_DIR_NAME );%0A        assertDirectoryBreadCrumbs( lowDir, TOP_DIR_NAME, MIDDLE_DIR_NAME, LOW_DIR_NAME );%0A        assertDirectoryBreadCrumbs( otherDir, TOP_DIR_NAME, OTHER_DIR_NAME );%0A    %7D%0A%0A    private void assertDirectoryBreadCrumbs( Directory workingDir, String... expectedNames ) %7B%0A        List%3CDirectoryBreadCrumb%3E breadCrumbs = DirectoryBreadCrumb.getBreadCrumbs( workingDir );%0A        int breadCrumbsSize = breadCrumbs.size();%0A%0A        assertEquals( expectedNames.length, breadCrumbsSize );%0A%0A        for ( int i = 0; i %3C breadCrumbsSize; i++ ) %7B%0A            assertEquals( expectedNames%5Bi%5D, breadCrumbs.get(i).getName() );%0A        %7D%0A    %7D%0A%7D%0A

Add simple breadcrumb test (#268)