@Test
public void shouldCreateStatusRepresentationWithMultipleDetails() {

    // given
    final Map<String, String> detailMap = new HashMap<>();
    detailMap.put("Count", "1000");
    final StatusRepresentation json = statusRepresentationOf(
            applicationStatus(mock(ApplicationInfo.class), mock(ClusterInfo.class), mock(SystemInfo.class), mock(VersionInfo.class), mock(TeamInfo.class), asList(
                    statusDetail("Some Detail", OK, "perfect"),
                    statusDetail("Some Other Detail", WARNING, "detailed warning", detailMap))
            )
    );
    // then
    assertThat(json.application.status, is(WARNING));
    @SuppressWarnings("unchecked")
    final Map<String, String> someDetail = (Map) json.application.statusDetails.get("someDetail");
    assertThat(someDetail.get("status"), is("OK"));
    assertThat(someDetail.get("message"), is("perfect"));
    assertThat(someDetail.get("status"), is("OK"));
    @SuppressWarnings("unchecked")
    final Map<String, String> someOtherDetail = (Map) json.application.statusDetails.get("someOtherDetail");
    assertThat(someOtherDetail.get("status"), is("WARNING"));
    assertThat(someOtherDetail.get("message"), is("detailed warning"));
    assertThat(someOtherDetail.get("count"), is("1000"));
}