@Test
public void should_not_crash_even_if_node_template_capacities_is_incorrect() throws Exception {

    nodeTemplate.getCapabilities().clear();
    Capability unknownCapacity = new Capability();
    unknownCapacity.setType("alien.typo.in.capa");
    nodeTemplate.getCapabilities().put("incorrect", unknownCapacity);
    Map<String, Capability> compatibleCapabilities = service.getCompatibleCapabilityByType(nodeTemplate, "alien.capability.test.Unknown");
    assertThat(compatibleCapabilities).hasSize(0);
}