@Test
public void shouldThrowExceptionWhenRegisteringDuplicateEntryUsingRegisterUnique() {

    // given
    mapRepository = new MapRepository<Object>(Object.class, new LinkedHashMap<RepositoryObjectKey, Object>());
    mapRepository.registerUnique("TEST", new Object());
    // when
    catchException(mapRepository).registerUnique("TEST", new Object());
    /// then
    assertThat(caughtException()).isInstanceOf(NonUniqueItemRegisteredException.class);
}