Buggy code:
@ RunWith ( SpringInstanceTestClassRunner . class ) @ ContextConfiguration ( "classpath:alfresco//application-context.xml" ) public abstract class AbstractRepoIntegrationTest implements InstanceTestClassListener { private static final Logger LOG = Logger . getLogger ( AbstractRepoIntegrationTest . class ) ; private static final String NAMESPACE_BEGIN = "" + ( QName . NAMESPACE_BEGIN ) ; private boolean _requiresNew = true ; @ Autowired @ Qualifier ( "authenticationComponent" ) protected AuthenticationComponent _authenticationComponent ; @ Autowired @ Qualifier ( "TransactionService" ) protected TransactionService _transactionService ; protected static RetryingTransactionHelper _transactionHelper ; @ Autowired @ Qualifier ( "policyBehaviourFilter" ) protected BehaviourFilter _behaviourFilter ; @ Autowired @ Qualifier ( "repositoryHelper" ) protected Repository _repository ; @ Autowired @ Qualifier ( "SiteService" ) protected SiteService _siteService ; @ Autowired @ Qualifier ( "AuthenticationService" ) protected MutableAuthenticationService _authenticationService ; @ Autowired @ Qualifier ( "PersonService" ) protected PersonService _personService ; @ Autowired @ Qualifier ( "NodeService" ) protected NodeService _nodeService ; @ Autowired @ Qualifier ( "FileFolderService" ) protected FileFolderService _fileFolderService ; @ Autowired @ Qualifier ( "NamespaceService" ) protected NamespaceService _namespaceService ; @ Autowired @ Qualifier ( "ContentService" ) protected ContentService _contentService ; @ Autowired @ Qualifier ( "WorkflowService" ) protected WorkflowService _workflowService ; @ Autowired @ Qualifier ( "global-properties" ) protected Properties _properties ; @ Resource ( name = "OwnableService" ) private OwnableService _ownableService ; @ Override public void beforeClassSetup ( ) { } @ Override public void afterClassSetup ( ) { } protected NodeRef createUser ( String userId ) { } protected NodeRef createUser ( final String userId , final AbstractRepoIntegrationTest . CreateUserCallback callback ) { } protected void deleteUser ( final NodeRef personRef ) { } protected void deleteUser ( final String userName ) { } protected SiteInfo createSite ( final String preset , final String siteName , final SiteVisibility visibility , final QName siteType , final AbstractRepoIntegrationTest . CreateSiteCallback callback ) { } protected SiteInfo createSite ( final String preset ) { } protected SiteInfo createSite ( ) { } protected void deleteSite ( SiteInfo siteInfo ) { } protected void deleteSite ( final SiteInfo siteInfo , final AbstractRepoIntegrationTest . BeforeDeleteSiteCallback callback ) { } protected FileInfo uploadDocument ( SiteInfo site , String filename ) { } protected FileInfo uploadDocument ( SiteInfo site , String filename , InputStream inputStream ) { } protected FileInfo uploadDocument ( SiteInfo site , String filename , InputStream inputStream , List < String > folders ) { } protected FileInfo uploadDocument ( SiteInfo site , String filename , InputStream inputStream , List < String > folders , String name ) { } protected FileInfo uploadDocument ( SiteInfo site , String filename , InputStream inputStream , List < String > folders , String name , NodeRef parentNodeRef ) { } protected FileInfo uploadDocument ( SiteInfo site , String filename , InputStream inputStream , List < String > folders , String name , NodeRef parentNodeRef , String type ) { <START_BUG> return uploadDocument ( site , filename , inputStream , folders , name , parentNodeRef , null , null ) ; <END_BUG> } protected FileInfo uploadDocument ( final SiteInfo site , final String filename , final InputStream inputStream , final List < String > folders , final String name , final NodeRef parentNodeRef , final String type , final Map < QName , Serializable > properties ) { } protected QName createQName ( String s ) { } public < R > R runInSite ( AbstractRepoIntegrationTest . RunInSite < R > runInSite ) { } public interface RunInSite < Result > { Result doInSite ( SiteInfo site ) throws Exception { } } public void setRequiresNew ( boolean requiresNew ) { } public boolean isRequiresNew ( ) { } public interface CreateUserCallback { void onCreateUser ( NodeRef user ) { } } public interface BeforeDeleteSiteCallback { void beforeDeleteSite ( SiteInfo siteInfo ) { } } public interface CreateSiteCallback { void onCreateSite ( SiteInfo site ) { } } public void assertType ( String message , NodeRef node , QName type ) { } public void assertType ( NodeRef node , QName type ) { } public void assertHasAspect ( String message , NodeRef node , QName aspect ) { } public void assertHasAspect ( NodeRef node , QName aspect ) { } }

Fix:
return uploadDocument ( site , filename , inputStream , folders , name , parentNodeRef , type , null ) ;