@Test
public void shouldThrowExceptionWhenTypeDefinedButNotFoundInRepo() {

    // given
    Level level = level().withType("type").build();
    when(typeRepository.getType("type")).thenReturn(null);
    // when
    catchException(basicLevelPreparer).prepare(level);
    // then
    assertThat(caughtException()).isInstanceOf(UnknownTypeException.class);
}