Source:
public void testWithSubProjectFound ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p1 = createProject ( "a/b" ) ; com.google.gerrit.reviewdb.client.Project.NameKey p2 = createProject ( "b" ) ; org.eclipse.jgit.lib.Config cfg = new org.eclipse.jgit.lib.Config ( ) ; java.lang.String gitmodules = ( ( ( ( ( ( ( ( ( "\n" + ( ( "[submodule \"a/b\"]\n" + "path = a/b\n" ) + "url = ssh://localhost/" ) ) + ( p1.get ( ) ) ) + "\n" ) + "branch = .\n" ) + "[submodule \"b\"]\n" ) + "path = b\n" ) + "url = http://localhost/" ) + ( p2.get ( ) ) ) + "\n" ) + "branch = .\n" ; cfg.fromText ( gitmodules ) ; java.lang.String thisServer = com.google.gerrit.acceptance.git.SubmoduleSectionParserIT.THIS_SERVER ; com.google.gerrit.reviewdb.client.Branch.NameKey targetBranch = new com.google.gerrit.reviewdb.client.Branch.NameKey ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) , "master" ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > res = new com.google.gerrit.server.util.SubmoduleSectionParser ( projectCache , cfg , thisServer , targetBranch ) . parseAllSections ( ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > expected = com.google.common.collect.Sets.newHashSet ( new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p2 , "master" ) , "b" ) , new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p1 , "master" ) , "a/b" ) ) ; com.google.common.truth.Truth.assertThat ( res ) . containsExactlyElementsIn ( expected ) ; }

Target:
public void testWithSubProjectFound ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p1 = createProject ( "a/b" ) ; com.google.gerrit.reviewdb.client.Project.NameKey p2 = createProject ( "b" ) ; org.eclipse.jgit.lib.Config cfg = new org.eclipse.jgit.lib.Config ( ) ; cfg.fromText ( ( ( ( ( ( ( ( ( ( ( "\n" + ( ( "[submodule \"a/b\"]\n" + "path = a/b\n" ) + "url = ssh://localhost/" ) ) + ( p1.get ( ) ) ) + "\n" ) + "branch = .\n" ) + "[submodule \"b\"]\n" ) + "path = b\n" ) + "url = http://localhost/" ) + ( p2.get ( ) ) ) + "\n" ) + "branch = .\n" ) ) ; com.google.gerrit.reviewdb.client.Branch.NameKey targetBranch = new com.google.gerrit.reviewdb.client.Branch.NameKey ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) , "master" ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > res = new com.google.gerrit.server.util.SubmoduleSectionParser ( cfg , com.google.gerrit.acceptance.git.SubmoduleSectionParserIT.THIS_SERVER , targetBranch ) . parseAllSections ( ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > expected = com.google.common.collect.Sets.newHashSet ( new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p2 , "master" ) , "b" ) , new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p1 , "master" ) , "a/b" ) ) ; com.google.common.truth.Truth.assertThat ( res ) . containsExactlyElementsIn ( expected ) ; }