private void internalImportByConfigWithError(final boolean failOnError) { try { TestUtils.disableFileAnalyzer(); final ImpExResource mediaRes = new StreamBasedImpExResource( new ByteArrayInputStream( "UPDATE Language;isocode[unique=true];active\n;test;true".getBytes()), CSVConstants.HYBRIS_ENCODING); final ImportConfig config = new ImportConfig(); config.setScript(mediaRes); config.setFailOnError(failOnError); final ImportResult result = importService.importData(config); assertNotNull(result); assertFalse(result.isSuccessful()); assertTrue(result.isError()); assertTrue(result.hasUnresolvedLines()); assertNotNull(result.getUnresolvedLines()); assertTrue(result.isFinished()); } finally { TestUtils.enableFileAnalyzer(); } }