repositoryField.setAccessible( true );
repositoryField.set( service,
new GuvnorM2Repository() );
//Make private method accessible for testing
HttpPostHelper helper = new HttpPostHelper();
java.lang.reflect.Method helperMethod = HttpPostHelper.class.getDeclaredMethod( "uploadFile", FormData.class );
helperMethod.setAccessible( true );
//Set the repository service created above in the HttpPostHelper
java.lang.reflect.Field m2RepoServiceField = HttpPostHelper.class.getDeclaredField( "m2RepoService" );