Source:
public void testWithMoreSections ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p1 = createProject ( "a" ) ; 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 = ( ( ( ( ( ( ( ( ( "" + ( ( "[submodule \"a\"]\n" + "path = a\n" ) + "url = ssh://localhost/" ) ) + ( p1.get ( ) ) ) + "\n" ) + "branch = .\n" ) + "[submodule \"b\"]\n" ) + " path = b\n" ) + " url = http://localhost:80/" ) + ( p2.get ( ) ) ) + "\n" ) + " branch = master\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 ( p1 , "master" ) , "a" ) , new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p2 , "master" ) , "b" ) ) ; com.google.common.truth.Truth.assertThat ( res ) . containsExactlyElementsIn ( expected ) ; }

Target:
public void testWithMoreSections ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p1 = createProject ( "a" ) ; com.google.gerrit.reviewdb.client.Project.NameKey p2 = createProject ( "b" ) ; org.eclipse.jgit.lib.Config cfg = new org.eclipse.jgit.lib.Config ( ) ; cfg.fromText ( ( ( ( ( ( ( ( ( ( ( "" + ( ( "[submodule \"a\"]\n" + " path = a\n" ) + " url = ssh://localhost/" ) ) + ( p1.get ( ) ) ) + "\n" ) + " branch = .\n" ) + "[submodule \"b\"]\n" ) + "\t\tpath = b\n" ) + " url = http://localhost:80/" ) + ( p2.get ( ) ) ) + "\n" ) + "\t\tbranch = master\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 ( p1 , "master" ) , "a" ) , new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p2 , "master" ) , "b" ) ) ; com.google.common.truth.Truth.assertThat ( res ) . containsExactlyElementsIn ( expected ) ; }