}
@Test
public void testJarFileWithSourceFiles() {
SuggestionCompletionLoader loader = new SuggestionCompletionLoader();
// Add jar file
String header = "package foo \n import org.test.Person \n import org.test.Banana \n ";
List<JarInputStream> jars = new ArrayList<JarInputStream>();
JarInputStream jis = null;
SuggestionCompletionEngine suggestionCompletionEngine = null;
try {
jis = new JarInputStream( this.getClass().getResourceAsStream(
"/JarWithSourceFiles.jar" ) );
jars.add( jis );
} catch ( IOException e ) {
fail( "Could not load jar" );
}
try {
suggestionCompletionEngine = loader.getSuggestionEngine( header,
jars,
new ArrayList<DSLTokenizedMappingFile>() );
} catch ( ClassFormatError e ) {
fail( "Can not load suggestions " + e );
}