@@ -0,0 +1,1041 @@
+package edu.isi.karma.mapreduce.driver;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.io.File;%0Aimport java.net.URL;%0A%0Aimport org.apache.hadoop.conf.Configuration;%0Aimport org.apache.hadoop.util.ToolRunner;%0Aimport org.junit.Test;%0A%0Apublic class TestAvroGenerationLocal %7B%0A%0A%09%0A%09@Test%0A%09public void test() throws Exception %7B%0A%09%09Configuration conf = new Configuration();%0A%09%0A%09%09%0A%09%09String %5B%5D jobArgs = %7B%22-files%22, new File(getTestResource(%22people-model.ttl%22).toURI()).getAbsolutePath().toString(), %22-archives%22, new File( getTestResource(%22sample_karma_user_home.zip%22).toURI()).getAbsolutePath(), %22-libjars%22, System.getProperty(%22user.home%22) + %22/.m2/repository/edu/isi/karma-offline/0.0.1-SNAPSHOT/karma-offline-0.0.1-SNAPSHOT-shaded.jar%22, new File(getTestResource(%22JSONAvroProcessorLocal.properties%22).toURI()).getAbsolutePath().toString()%7D;%0A%09%09int res = ToolRunner.run(conf, new JSONAvroProcessor(), jobArgs);%0A%09%09assertEquals(0, res);%0A%09%7D%0A%0A%0A%09protected URL getTestResource(String name)%0A%09%7B%0A%09%09return getClass().getClassLoader().getResource(name);%0A%09%7D%0A%7D%0A

Test for generating JSON from Avro in local MR