* RtHooks can fetch non empty list of hooks.
* @throws Exception if some problem inside
*/
@Test
public void canFetchNonEmptyListOfHooks() throws Exception {
final MkContainer container = new MkGrizzlyContainer().next(
new MkAnswer.Simple(
HttpURLConnection.HTTP_OK,
Json.createArrayBuilder()
.add(hook("hook 1", Collections.<String, String>emptyMap()))
.add(hook("hook 2", Collections.<String, String>emptyMap()))
.build().toString()
)
).start();
final RtHooks hooks = new RtHooks(
new JdkRequest(container.home()),
RtHooksTest.repo()
);
MatcherAssert.assertThat(
hooks.iterate(),
Matchers.<Hook>iterableWithSize(2)
);
container.stop();
}