@@ -0,0 +1,1869 @@
+/*-%0A * Copyright (c) 2013 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 */%0Apackage org.fedoraproject.maven.repository;%0A%0Aimport org.codehaus.plexus.PlexusTestCase;%0Aimport org.fedoraproject.maven.config.Configuration;%0Aimport org.fedoraproject.maven.config.Configurator;%0Aimport org.fedoraproject.maven.config.Repository;%0Aimport org.fedoraproject.maven.config.RepositoryConfigurator;%0A%0A/**%0A * @author Mikolaj Izdebski%0A */%0Apublic class CustomRepositoryTest%0A    extends PlexusTestCase%0A%7B%0A    /**%0A     * Test if simple (non-composite) repository configuration works as expected.%0A     * %0A     * @throws Exception%0A     */%0A    public void testCustomRepository()%0A        throws Exception%0A    %7B%0A        Configurator configurator = lookup( Configurator.class );%0A        Configuration configuration = configurator.getConfiguration();%0A%0A        Repository repository = new Repository();%0A        repository.setId( %22test123%22 );%0A        repository.setType( %22my-type%22 );%0A        repository.addProperty( %22foo%22, %22bar%22 );%0A        configuration.addRepository( repository );%0A%0A        RepositoryConfigurator repoConfigurator = lookup( RepositoryConfigurator.class );%0A        org.fedoraproject.maven.repository.Repository repo = repoConfigurator.configureRepository( %22test123%22 );%0A        assertNotNull( repo );%0A        assertTrue( repo instanceof MyRepository );%0A    %7D%0A%7D%0A

Implement CustomRepositoryTest