bundle.close();
}
@Test
public void testHTTPIncoming() throws IOException {
Repository repoA = getTestRepository();
writeFile("x", "abc");
AddCommand add = AddCommand.on(repoA);
add.execute();
CommitCommand commit = CommitCommand.on(repoA);
commit.message("added x").user("user");
commit.execute();
ServeState serveState = startServing(repoA);
try {
int port = serveState.getPort();
Repository repoB = getTestRepository2();
Bundle b = IncomingCommand.on(repoB).execute("http://localhost:" + port);
List<Changeset> changesets = b.getChangesets();
Assert.assertEquals(1, changesets.size());
Changeset cs = changesets.get(0);
Assert.assertEquals("user", cs.getUser());