Source:
public void testEmptyCommit ( ) throws java.lang.Exception { org.easymock.EasyMock.expect ( schemaFactory.open ( ) ) . andReturn ( schema ) ; final org.eclipse.jgit.lib.Repository realDb = createWorkRepository ( ) ; final org.eclipse.jgit.api.Git git = new org.eclipse.jgit.api.Git ( realDb ) ; final org.eclipse.jgit.revwalk.RevCommit mergeTip = git.commit ( ) . setMessage ( "test" ) . call ( ) ; final com.google.gerrit.reviewdb.client.Branch.NameKey branchNameKey = new com.google.gerrit.reviewdb.client.Branch.NameKey ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "test-project" ) , "test-branch" ) ; org.easymock.EasyMock.expect ( urlProvider.get ( ) ) . andReturn ( "http://localhost:8080" ) ; org.easymock.EasyMock.expect ( schema.submoduleSubscriptions ( ) ) . andReturn ( subscriptions ) ; final com.google.gwtorm.server.ResultSet < com.google.gerrit.reviewdb.client.SubmoduleSubscription > emptySubscriptions = new com.google.gwtorm.server.ListResultSet ( new java.util.ArrayList < com.google.gerrit.reviewdb.client.SubmoduleSubscription > ( ) ) ; org.easymock.EasyMock.expect ( subscriptions.bySubmodule ( branchNameKey ) ) . andReturn ( emptySubscriptions ) ; schema.close ( ) ; doReplay ( ) ; final com.google.gerrit.server.git.SubmoduleOp submoduleOp = new com.google.gerrit.server.git.SubmoduleOp ( branchNameKey , mergeTip , new org.eclipse.jgit.revwalk.RevWalk ( realDb ) , urlProvider , schemaFactory , realDb , null , new java.util.ArrayList < com.google.gerrit.reviewdb.client.Change > ( ) , null , null , null , null , null , null ) ; submoduleOp.update ( ) ; doVerify ( ) ; }

Target:
public void testEmptyCommit ( ) throws java.lang.Exception { org.easymock.EasyMock.expect ( schemaFactory.open ( ) ) . andReturn ( schema ) ; try ( org.eclipse.jgit.lib.Repository realDb = createWorkRepository ( ) ) { @ java.lang.SuppressWarnings ( value = "resource" ) final org.eclipse.jgit.api.Git git = new org.eclipse.jgit.api.Git ( realDb ) ; final org.eclipse.jgit.revwalk.RevCommit mergeTip = git.commit ( ) . setMessage ( "test" ) . call ( ) ; final com.google.gerrit.reviewdb.client.Branch.NameKey branchNameKey = new com.google.gerrit.reviewdb.client.Branch.NameKey ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "test-project" ) , "test-branch" ) ; org.easymock.EasyMock.expect ( urlProvider.get ( ) ) . andReturn ( "http://localhost:8080" ) ; org.easymock.EasyMock.expect ( schema.submoduleSubscriptions ( ) ) . andReturn ( subscriptions ) ; final com.google.gwtorm.server.ResultSet < com.google.gerrit.reviewdb.client.SubmoduleSubscription > emptySubscriptions = new com.google.gwtorm.server.ListResultSet ( new java.util.ArrayList < com.google.gerrit.reviewdb.client.SubmoduleSubscription > ( ) ) ; org.easymock.EasyMock.expect ( subscriptions.bySubmodule ( branchNameKey ) ) . andReturn ( emptySubscriptions ) ; schema.close ( ) ; doReplay ( ) ; final com.google.gerrit.server.git.SubmoduleOp submoduleOp = new com.google.gerrit.server.git.SubmoduleOp ( branchNameKey , mergeTip , new org.eclipse.jgit.revwalk.RevWalk ( realDb ) , urlProvider , schemaFactory , realDb , null , new java.util.ArrayList < com.google.gerrit.reviewdb.client.Change > ( ) , null , null , null , null , null , null ) ; submoduleOp.update ( ) ; doVerify ( ) ; } }