@@ -0,0 +1,1712 @@
+// Copyright (C) 2009 The Android Open Source Project%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 com.google.gerrit.pgm.init;%0A%0Aimport static org.easymock.classextension.EasyMock.createStrictMock;%0Aimport static org.easymock.classextension.EasyMock.replay;%0Aimport static org.easymock.classextension.EasyMock.verify;%0A%0Aimport com.google.gerrit.pgm.util.ConsoleUI;%0Aimport com.google.gerrit.server.config.SitePaths;%0Aimport com.google.inject.Provider;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0A%0Apublic class LibrariesTest extends TestCase %7B%0A  public void testCreate() throws FileNotFoundException %7B%0A    final SitePaths site = new SitePaths(new File(%22.%22));%0A    final ReloadSiteLibrary reload = createStrictMock(ReloadSiteLibrary.class);%0A    final ConsoleUI ui = createStrictMock(ConsoleUI.class);%0A%0A    replay(ui);%0A    replay(reload);%0A%0A    Libraries lib = new Libraries(new Provider%3CLibraryDownloader%3E() %7B%0A      @Override%0A      public LibraryDownloader get() %7B%0A        return new LibraryDownloader(reload, ui, site);%0A      %7D%0A    %7D);%0A%0A    assertNotNull(lib.bouncyCastle);%0A    assertNotNull(lib.mysqlDriver);%0A%0A    verify(ui);%0A    verify(reload);%0A  %7D%0A%7D%0A

Test init's Libraries class