* @throws Exception If some problem inside
*/
@Test
public void worksWithSeveralGists() throws Exception {
final Gists gists = new MkGithub().gists();
final Gist gist = gists.create(
Collections.singletonMap("test-file-name.txt", "none"), false
);
final Gist othergist = gists.create(
Collections.singletonMap("test-file-name2.txt", ""), false
);
final String file = "t.txt";
gist.write(file, "hello, everybody!");
othergist.write(file, "bye, everybody!");
MatcherAssert.assertThat(
gist.read(file),
Matchers.startsWith("hello, ")
);
MatcherAssert.assertThat(
othergist.read(file),
Matchers.startsWith("bye, ")
);
}