@Test
public void createLabel() throws Exception {
final String name = "API";
final String color = "FFFFFF";
final String body = label(name, color).toString();
final MkContainer container = new MkGrizzlyContainer().next(
new MkAnswer.Simple(HttpURLConnection.HTTP_CREATED, body)
).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, body)).start();
final RtLabels labels = new RtLabels(
new JdkRequest(container.home()),
repo()
);
final Label label = labels.create(name, color);
MatcherAssert.assertThat(
container.take().method(),
Matchers.equalTo(Request.POST)
);
MatcherAssert.assertThat(
new Label.Smart(label).name(),
Matchers.equalTo(name)
);
MatcherAssert.assertThat(
new Label.Smart(label).color(),
Matchers.equalTo(color)
);
container.stop();
}