@Test
public void shouldReturnCriticalityAndExpectations() throws Exception {

    when(externalDependencies.getDependencies()).thenReturn(asList(
            mongoDependency(singletonList(datasource("foo:42/bar"))).build(),
            restServiceDependency("foobar:4711")
                    .withCriticality(criticality(HIGH, "Bad. Really bad."))
                    .withExpectations(lowExpectations())
                    .build()
    ));
    mockMvc.perform(get("/internal/dependencies").accept(APPLICATION_JSON))
            .andExpect(
                    jsonPath("@.dependencies[0].criticality.level").value("NOT_SPECIFIED")
            )
            .andExpect(
                    jsonPath("@.dependencies[0].criticality.disasterImpact").value("Not Specified")
            )
            .andExpect(
                    jsonPath("@.dependencies[0].expectations.availability").value("NOT_SPECIFIED")
            )
            .andExpect(
                    jsonPath("@.dependencies[0].expectations.performance").value("NOT_SPECIFIED")
            )
            .andExpect(
                    jsonPath("@.dependencies[1].criticality.level").value("HIGH")
            )
            .andExpect(
                    jsonPath("@.dependencies[1].criticality.disasterImpact").value("Bad. Really bad.")
            )
            .andExpect(
                    jsonPath("@.dependencies[1].expectations.availability").value("LOW")
            )
            .andExpect(
                    jsonPath("@.dependencies[1].expectations.performance").value("LOW")
            );
}