assertEquals(endTime, eventTimeSlotData.get("endTime").toString());
}
private MockRestServiceServer setupMockRestServiceServer(NFJSLoader loader, int numberOfLoads) {
MockRestServiceServer mockServer = MockRestServiceServer.createServer(loader.getRestTemplate());
for (int i=0; i < numberOfLoads; i++) {
mockServer.expect(
requestTo("https://springone2gx.com/m/data/show_short.json?showId=" + SHOW_ID))
.andExpect(method(GET))
.andRespond(ResponseCreators.withSuccess(new ClassPathResource("show_short.json", NFJSLoaderTest.class), APPLICATION_JSON));
mockServer.expect(
requestTo("https://springone2gx.com/m/data/show_schedule.json?showId=" + SHOW_ID))
.andExpect(method(GET))
.andRespond(ResponseCreators.withSuccess(new ClassPathResource("show_schedule.json", NFJSLoaderTest.class), APPLICATION_JSON));
mockServer.expect(
requestTo("https://springone2gx.com/m/data/show_speakers.json?showId=" + SHOW_ID))
.andExpect(method(GET))
.andRespond(ResponseCreators.withSuccess(new ClassPathResource("show_speakers.json", NFJSLoaderTest.class), APPLICATION_JSON));
mockServer.expect(
requestTo("https://springone2gx.com/m/data/show_topics.json?showId=" + SHOW_ID))
.andExpect(method(GET))
.andRespond(ResponseCreators.withSuccess(new ClassPathResource("show_topics.json", NFJSLoaderTest.class), APPLICATION_JSON));
}
return mockServer;