Search in sources :

Example 1 with IRepositoryImportLogger

use of org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger in project pentaho-platform by pentaho.

the class RepositoryImportResourceTest method setUp.

@Before
public void setUp() throws ObjectFactoryException, PlatformImportException, DomainIdNullException, DomainAlreadyExistsException, DomainStorageException, IOException {
    PentahoSystem.init();
    IPentahoSession session = mock(IPentahoSession.class);
    doReturn("sampleSession").when(session).getName();
    PentahoSessionHolder.setSession(session);
    handler = mock(SolutionImportHandler.class);
    importer = mock(PentahoPlatformImporter.class);
    policy = mock(IAuthorizationPolicy.class);
    ITenant tenat = mock(ITenant.class);
    resolver = mock(ITenantedPrincipleNameResolver.class);
    doReturn(tenat).when(resolver).getTenant(anyString());
    doReturn(REAL_USER).when(resolver).getPrincipleName(anyString());
    policy = mock(IAuthorizationPolicy.class);
    pentahoObjectFactory = mock(IPentahoObjectFactory.class);
    iPlatformMimeResolver = mock(NameBaseMimeResolver.class);
    iRepositoryImportLogger = mock(IRepositoryImportLogger.class);
    catalogService = mock(MondrianCatalogHelper.class);
    doReturn("xml").when(iPlatformMimeResolver).resolveMimeForFileName("");
    doReturn(iRepositoryImportLogger).when(importer).getRepositoryImportLogger();
    // for calling importFile in RepositoryImportResource
    doAnswer(new Answer<Void>() {

        @Override
        public Void answer(InvocationOnMock invocation) throws Throwable {
            handler.importFile(any(IPlatformImportBundle.class));
            return null;
        }
    }).when(importer).importFile(any(IPlatformImportBundle.class));
    // for calling importFile in PentahoPlatformImporter
    doAnswer(new Answer<Void>() {

        @Override
        public Void answer(InvocationOnMock invocation) throws Throwable {
            handler.getImportSession();
            return null;
        }
    }).when(handler).importFile(any(IPlatformImportBundle.class));
    // for calling getImportSession in SolutionImportHandler
    doAnswer(new Answer<Void>() {

        @Override
        public Void answer(InvocationOnMock invocation) throws Throwable {
            ImportSession importsession = ImportSession.getSession();
            importsession.setManifest(mock(ExportManifest.class));
            return null;
        }
    }).when(handler).getImportSession();
    when(pentahoObjectFactory.objectDefined(anyString())).thenReturn(true);
    when(pentahoObjectFactory.get(this.anyClass(), anyString(), any(IPentahoSession.class))).thenAnswer(new Answer<Object>() {

        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            if (invocation.getArguments()[0].equals(IAuthorizationPolicy.class)) {
                return policy;
            }
            if (invocation.getArguments()[0].equals(ITenantedPrincipleNameResolver.class)) {
                return resolver;
            }
            if (invocation.getArguments()[0].equals(IMondrianCatalogService.class)) {
                return catalogService;
            }
            return null;
        }
    });
    PentahoSystem.registerObjectFactory(pentahoObjectFactory);
    PentahoSystem.registerObject(iPlatformMimeResolver);
    PentahoSystem.registerObject(iRepositoryImportLogger);
    PentahoSystem.registerObject(catalogService);
    PentahoSystem.registerObject(handler);
    PentahoSystem.registerObject(importer);
}
Also used : ImportSession(org.pentaho.platform.plugin.services.importexport.ImportSession) PentahoPlatformImporter(org.pentaho.platform.plugin.services.importer.PentahoPlatformImporter) IAuthorizationPolicy(org.pentaho.platform.api.engine.IAuthorizationPolicy) NameBaseMimeResolver(org.pentaho.platform.plugin.services.importer.NameBaseMimeResolver) IPentahoObjectFactory(org.pentaho.platform.api.engine.IPentahoObjectFactory) IPentahoSession(org.pentaho.platform.api.engine.IPentahoSession) IRepositoryImportLogger(org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger) IMondrianCatalogService(org.pentaho.platform.plugin.action.mondrian.catalog.IMondrianCatalogService) IPlatformImportBundle(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle) MondrianCatalogHelper(org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper) ITenant(org.pentaho.platform.api.mt.ITenant) SolutionImportHandler(org.pentaho.platform.plugin.services.importer.SolutionImportHandler) InvocationOnMock(org.mockito.invocation.InvocationOnMock) ITenantedPrincipleNameResolver(org.pentaho.platform.api.mt.ITenantedPrincipleNameResolver) Before(org.junit.Before)

Example 2 with IRepositoryImportLogger

use of org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger in project pentaho-platform by pentaho.

the class PlatformImporterTest method testMatchingMimeAndHandler.

@Test
public void testMatchingMimeAndHandler() throws Exception {
    List<IMimeType> mimeList = Collections.singletonList((IMimeType) new MimeType("text/xmi+xml", "xmi"));
    IPlatformImportHandler mockImportHandler = mock(IPlatformImportHandler.class);
    when(mockImportHandler.getMimeTypes()).thenReturn(mimeList);
    List<IPlatformImportHandler> handlers = Collections.singletonList(mockImportHandler);
    NameBaseMimeResolver nameResolver = new NameBaseMimeResolver();
    PentahoSystem.registerObject(nameResolver);
    // mock logger to prevent npe
    IRepositoryImportLogger importLogger = new Log4JRepositoryImportLogger();
    PentahoPlatformImporter importer = new PentahoPlatformImporter(handlers, new DefaultRepositoryContentConverterHandler(new HashMap<String, Converter>()));
    importer.setRepositoryImportLogger(importLogger);
    FileInputStream in = new FileInputStream(new File(TestResourceLocation.TEST_RESOURCES + "/ImportTest/steel-wheels.xmi"));
    // With custom domain id
    final IPlatformImportBundle bundle1 = (new RepositoryFileImportBundle.Builder().input(in).charSet("UTF-8").hidden(false).mime("text/xmi+xml").name("steel-wheels.xmi").comment("Test Metadata Import").withParam("domain-id", "parameterized-domain-id")).build();
    importer.importFile(bundle1);
    verify(mockImportHandler, times(1)).importFile(bundle1);
}
Also used : HashMap(java.util.HashMap) IRepositoryImportLogger(org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger) IMimeType(org.pentaho.platform.api.mimetype.IMimeType) MimeType(org.pentaho.platform.core.mimetype.MimeType) FileInputStream(java.io.FileInputStream) IPlatformImportBundle(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle) IMimeType(org.pentaho.platform.api.mimetype.IMimeType) Log4JRepositoryImportLogger(org.pentaho.platform.plugin.services.importexport.Log4JRepositoryImportLogger) File(java.io.File) Test(org.junit.Test)

Example 3 with IRepositoryImportLogger

use of org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger in project pentaho-platform by pentaho.

the class ArchiveLoaderTest method testWillContinueToLoadOnException.

@Test
public void testWillContinueToLoadOnException() throws Exception {
    final IPlatformImporter importer = mock(IPlatformImporter.class);
    final FileInputStream inputStream = mock(FileInputStream.class);
    final ArchiveLoader loader = createArchiveLoader(importer, inputStream);
    final File directory = mock(File.class);
    final File jobs = mock(File.class);
    String jobsName = "jobs.zip";
    when(jobs.getName()).thenReturn(jobsName);
    final File reports = mock(File.class);
    when(jobs.getPath()).thenReturn("/root/path/" + jobsName);
    String reportsName = "reports.zip";
    when(reports.getName()).thenReturn(reportsName);
    when(reports.getPath()).thenReturn("/root/path/" + reportsName);
    when(directory.listFiles(ZIPS_FILTER)).thenReturn(new File[] { jobs, reports });
    Exception exception = new RuntimeException("exception thrown on purpose from testWillContinueToLoadOnException");
    doThrow(exception).when(importer).importFile(argThat(bundleMatcher(jobsName, inputStream)));
    IRepositoryImportLogger logger = mock(IRepositoryImportLogger.class);
    when(importer.getRepositoryImportLogger()).thenReturn(logger);
    loader.loadAll(directory, ZIPS_FILTER);
    verify(importer).importFile(argThat(bundleMatcher(jobsName, inputStream)));
    verify(importer).importFile(argThat(bundleMatcher(reportsName, inputStream)));
    verify(jobs).renameTo(argThat(fileMatcher(jobs)));
    verify(reports).renameTo(argThat(fileMatcher(reports)));
}
Also used : IRepositoryImportLogger(org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger) File(java.io.File) FileInputStream(java.io.FileInputStream) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 4 with IRepositoryImportLogger

use of org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger in project pentaho-platform by pentaho.

the class RepositoryImportResource method doPostImport.

/**
 * Attempts to import all files from the zip archive or single file. A log file is produced at the end of import.
 *
 * <p><b>Example Request:</b><br />
 *    POST pentaho/api/repo/files/import
 *    <br /><b>POST data:</b>
 *    <pre function="syntax.xml">
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="importDir"
 *
 *      /public
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="fileUpload"; filename="test.csv"
 *      Content-Type: application/vnd.ms-excel
 *
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="overwriteFile"
 *
 *      true
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="overwriteAclPermissions"
 *
 *      true
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="applyAclPermissions"
 *
 *      true
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="retainOwnership"
 *
 *      true
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="charSet"
 *
 *      UTF-8
 *      ------WebKitFormBoundaryB9hzsGp4wR5SGAZD
 *      Content-Disposition: form-data; name="logLevel"
 *
 *      INFO
 *      ------WebKitFormBoundaryd1z6iZhXyx12RYxV
 *      Content-Disposition: form-data; name="fileNameOverride"
 *
 *      fileNameOverriden.csv
 *      ------WebKitFormBoundaryd1z6iZhXyx12RYxV--
 *    </pre>
 * </p>
 *
 * @param importDir               JCR Directory to which the zip structure or single file will be uploaded to.
 * @param fileUpload              Input stream for the file.
 * @param overwriteFile           The flag indicates ability to overwrite existing file.
 * @param overwriteAclPermissions The flag indicates ability to overwrite Acl permissions.
 * @param applyAclPermissions     The flag indicates ability to apply Acl permissions.
 * @param retainOwnership         The flag indicates ability to retain ownership.
 * @param charSet                 The charset for imported file.
 * @param logLevel                The level of logging.
 * @param fileNameOverride        If present and the content represents a single file, this parameter contains the filename to use
 *                                when storing the file in the repository. If not present, the fileInfo.getFileName will be used.
 *                                Note that the later cannot reliably handle foreign character sets.
 *
 * @return A jax-rs Response object with the appropriate header and body.
 *
 * <p><b>Example Response:</b></p>
 * <pre function="syntax.xml">
 *   &lt;html&gt;
 *   &lt;head&gt;
 *   &lt;title&gt;Repository Import Log&lt;/title&gt;
 *   &lt;/head&gt;
 *   &lt;body bgcolor="#FFFFFF" topmargin="6" leftmargin="6" style="font-family: arial,sans-serif; font-size: x-small"&gt;
 *   &lt;hr size="1" noshade&gt;
 *   Log session start time Thu Feb 26 11:04:19 BRT 2015&lt;br&gt;
 *   &lt;br&gt;
 *   &lt;table cellspacing="0" cellpadding="4" border="1" bordercolor="#224466" width="100%"&gt;
 *   &lt;tr style="background: #336699; color: #FFFFFF; text-align: left"&gt;
 *   &lt;th&gt;Import File&lt;/th&gt;
 *   &lt;th&gt;Level&lt;/th&gt;
 *   &lt;th&gt;Message&lt;/th&gt;
 *   &lt;/tr&gt;
 *   &lt;td title="importFile"&gt;/public&lt;/td&gt;
 *   &lt;td title="Level"&gt;INFO&lt;/td&gt;
 *   &lt;td title="Message"&gt;Start Import Job&lt;/td&gt;
 *   &lt;/tr&gt;
 *   &lt;td title="importFile"&gt;/public/fileNameOverriden.csv&lt;/td&gt;
 *   &lt;td title="Level"&gt;INFO&lt;/td&gt;
 *   &lt;td title="Message"&gt;Start File Import&lt;/td&gt;
 *   &lt;/tr&gt;
 *   &lt;td title="importFile"&gt;/public/fileNameOverriden.csv&lt;/td&gt;
 *   &lt;td title="Level"&gt;&lt;font color="#993300"&gt;&lt;strong&gt;WARN&lt;/strong&gt;&lt;/font&gt;&lt;/td&gt;
 *   &lt;td title="Message"&gt;fileNameOverriden.csv&lt;/td&gt;
 *   &lt;/tr&gt;
 *   &lt;td title="importFile"&gt;/public&lt;/td&gt;
 *   &lt;td title="Level"&gt;INFO&lt;/td&gt;
 *   &lt;td title="Message"&gt;End Import Job&lt;/td&gt;
 *   &lt;/tr&gt;
 *   &lt;/table&gt;
 *   &lt;br&gt;
 *   &lt;/body&gt;&lt;/html&gt;
 * </pre>
 */
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.TEXT_HTML)
@Facet(name = "Unsupported")
public Response doPostImport(@FormDataParam("importDir") String importDir, @FormDataParam("fileUpload") InputStream fileUpload, @FormDataParam("overwriteFile") String overwriteFile, @FormDataParam("overwriteAclPermissions") String overwriteAclPermissions, @FormDataParam("applyAclPermissions") String applyAclPermission, @FormDataParam("retainOwnership") String retainOwnership, @FormDataParam("charSet") String charSet, @FormDataParam("logLevel") String logLevel, @FormDataParam("fileUpload") FormDataContentDisposition fileInfo, @FormDataParam("fileNameOverride") String fileNameOverride) {
    IRepositoryImportLogger importLogger = null;
    ByteArrayOutputStream importLoggerStream = new ByteArrayOutputStream();
    boolean logJobStarted = false;
    if (StringUtils.isBlank(charSet)) {
        charSet = DEFAULT_CHAR_SET;
    }
    try {
        validateAccess(importDir);
        boolean overwriteFileFlag = ("false".equals(overwriteFile) ? false : true);
        boolean overwriteAclSettingsFlag = ("true".equals(overwriteAclPermissions) ? true : false);
        boolean applyAclSettingsFlag = ("true".equals(applyAclPermission) ? true : false);
        boolean retainOwnershipFlag = ("true".equals(retainOwnership) ? true : false);
        // If logLevel is null then we will default to ERROR
        if (logLevel == null || logLevel.length() <= 0) {
            logLevel = "ERROR";
        }
        // Non-admins cannot process a manifest
        FileService fileService = new FileService();
        if (!fileService.doCanAdminister()) {
            applyAclSettingsFlag = false;
            retainOwnershipFlag = true;
        }
        Level level = Level.toLevel(logLevel);
        ImportSession.getSession().setAclProperties(applyAclSettingsFlag, retainOwnershipFlag, overwriteAclSettingsFlag);
        // The fileNameOverride was added because the formDataContentDispositionfile object cannot reliable
        // contain non US-ASCII characters.  See RFC283 section 2.3 for details
        String fileName = fileNameOverride != null ? fileNameOverride : fileInfo.getFileName();
        RepositoryFileImportBundle.Builder bundleBuilder = new RepositoryFileImportBundle.Builder();
        bundleBuilder.input(fileUpload);
        bundleBuilder.charSet(charSet);
        bundleBuilder.path(importDir);
        bundleBuilder.overwriteFile(overwriteFileFlag);
        bundleBuilder.applyAclSettings(applyAclSettingsFlag);
        bundleBuilder.overwriteAclSettings(overwriteAclSettingsFlag);
        bundleBuilder.retainOwnership(retainOwnershipFlag);
        bundleBuilder.name(fileName);
        IPlatformImportBundle bundle = bundleBuilder.build();
        IPlatformMimeResolver mimeResolver = PentahoSystem.get(IPlatformMimeResolver.class);
        String mimeTypeFromFile = mimeResolver.resolveMimeForFileName(fileName);
        if (mimeTypeFromFile == null) {
            return Response.ok("INVALID_MIME_TYPE", MediaType.TEXT_HTML).build();
        }
        bundleBuilder.mime(mimeTypeFromFile);
        IPlatformImporter importer = PentahoSystem.get(IPlatformImporter.class);
        importLogger = importer.getRepositoryImportLogger();
        final String mimeType = bundle.getMimeType() != null ? bundle.getMimeType() : mimeResolver.resolveMimeForBundle(bundle);
        if (mimeType == null) {
            return Response.ok("INVALID_MIME_TYPE", MediaType.TEXT_HTML).build();
        }
        logJobStarted = true;
        importLogger.startJob(importLoggerStream, importDir, level);
        importer.importFile(bundle);
        // Flush the Mondrian cache to show imported data-sources.
        IMondrianCatalogService mondrianCatalogService = PentahoSystem.get(IMondrianCatalogService.class, "IMondrianCatalogService", PentahoSessionHolder.getSession());
        mondrianCatalogService.reInit(PentahoSessionHolder.getSession());
    } catch (PentahoAccessControlException e) {
        return Response.serverError().entity(e.toString()).build();
    } catch (Exception e) {
        return Response.serverError().entity(e.toString()).build();
    } finally {
        ImportSession.clearSession();
        if (logJobStarted == true) {
            importLogger.endJob();
        }
    }
    String responseBody;
    try {
        responseBody = importLoggerStream.toString(charSet);
    } catch (UnsupportedEncodingException e) {
        LOGGER.error("Encoding of response body is failed. (charSet=" + charSet + ")", e);
        responseBody = importLoggerStream.toString();
    }
    return Response.ok(responseBody, MediaType.TEXT_HTML).build();
}
Also used : FileService(org.pentaho.platform.web.http.api.resources.services.FileService) IRepositoryImportLogger(org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ByteArrayOutputStream(java.io.ByteArrayOutputStream) IMondrianCatalogService(org.pentaho.platform.plugin.action.mondrian.catalog.IMondrianCatalogService) PentahoAccessControlException(org.pentaho.platform.api.engine.PentahoAccessControlException) PentahoAccessControlException(org.pentaho.platform.api.engine.PentahoAccessControlException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) IPlatformImportBundle(org.pentaho.platform.api.repository2.unified.IPlatformImportBundle) IPlatformMimeResolver(org.pentaho.platform.api.mimetype.IPlatformMimeResolver) Level(org.apache.log4j.Level) RepositoryFileImportBundle(org.pentaho.platform.plugin.services.importer.RepositoryFileImportBundle) IPlatformImporter(org.pentaho.platform.plugin.services.importer.IPlatformImporter) POST(javax.ws.rs.POST) Consumes(javax.ws.rs.Consumes) Produces(javax.ws.rs.Produces) Facet(org.codehaus.enunciate.Facet)

Example 5 with IRepositoryImportLogger

use of org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger in project pentaho-platform by pentaho.

the class FileServiceTest method testSystemRestore.

@Test
public void testSystemRestore() throws Exception {
    InputStream inputStreamMock = mock(InputStream.class);
    IAuthorizationPolicy authorizationPolicy = mock(IAuthorizationPolicy.class);
    IRepositoryImportLogger iRepositoryImportLogger = mock(IRepositoryImportLogger.class);
    doReturn(authorizationPolicy).when(fileService).getPolicy();
    doReturn(true).when(authorizationPolicy).isAllowed(RepositoryReadAction.NAME);
    doReturn(true).when(authorizationPolicy).isAllowed(RepositoryCreateAction.NAME);
    doReturn(true).when(authorizationPolicy).isAllowed(AdministerSecurityAction.NAME);
    doReturn(iRepositoryImportLogger).when(platformImporter).getRepositoryImportLogger();
    fileService.systemRestore(inputStreamMock, "true", "false", "true");
    verify(fileService).doCanAdminister();
    verify(iRepositoryImportLogger).startJob(any(), anyString(), any());
    verify(iRepositoryImportLogger).endJob();
    ArgumentCaptor<RepositoryFileImportBundle> argumentCaptor = ArgumentCaptor.forClass(RepositoryFileImportBundle.class);
    verify(platformImporter).importFile(argumentCaptor.capture());
    RepositoryFileImportBundle bundle = argumentCaptor.getValue();
    assertTrue(bundle.getInputStream() == inputStreamMock);
    assertEquals("UTF-8", bundle.getCharSet());
    assertEquals(RepositoryFile.HIDDEN_BY_DEFAULT, bundle.isHidden());
    assertEquals(RepositoryFile.SCHEDULABLE_BY_DEFAULT, bundle.isSchedulable());
    assertEquals("/", bundle.getPath());
    assertEquals(true, bundle.overwriteInRepository());
    assertEquals("SystemBackup.zip", bundle.getName());
    assertFalse(bundle.isApplyAclSettings());
    assertTrue(bundle.isRetainOwnership());
    assertTrue(bundle.isOverwriteAclSettings());
    assertTrue(bundle.isPreserveDsw());
    ImportSession session = ImportSession.getSession();
    assertFalse(session.isApplyAclSettings());
    assertTrue(session.isRetainOwnership());
    assertTrue(session.isOverwriteAclSettings());
}
Also used : ImportSession(org.pentaho.platform.plugin.services.importexport.ImportSession) IAuthorizationPolicy(org.pentaho.platform.api.engine.IAuthorizationPolicy) RepositoryFileInputStream(org.pentaho.platform.repository2.unified.fileio.RepositoryFileInputStream) InputStream(java.io.InputStream) IRepositoryImportLogger(org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger) RepositoryFileImportBundle(org.pentaho.platform.plugin.services.importer.RepositoryFileImportBundle) Test(org.junit.Test)

Aggregations

IRepositoryImportLogger (org.pentaho.platform.plugin.services.importexport.IRepositoryImportLogger)8 Test (org.junit.Test)5 File (java.io.File)4 FileInputStream (java.io.FileInputStream)4 IPlatformImportBundle (org.pentaho.platform.api.repository2.unified.IPlatformImportBundle)4 RepositoryFileImportBundle (org.pentaho.platform.plugin.services.importer.RepositoryFileImportBundle)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 HashMap (java.util.HashMap)2 Level (org.apache.log4j.Level)2 IAuthorizationPolicy (org.pentaho.platform.api.engine.IAuthorizationPolicy)2 IMimeType (org.pentaho.platform.api.mimetype.IMimeType)2 MimeType (org.pentaho.platform.core.mimetype.MimeType)2 IMondrianCatalogService (org.pentaho.platform.plugin.action.mondrian.catalog.IMondrianCatalogService)2 IPlatformImporter (org.pentaho.platform.plugin.services.importer.IPlatformImporter)2 ImportSession (org.pentaho.platform.plugin.services.importexport.ImportSession)2 Log4JRepositoryImportLogger (org.pentaho.platform.plugin.services.importexport.Log4JRepositoryImportLogger)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1