	@Test // DATAREST-1143
	public void testUnknownItemThrowsResourceNotFound() throws Exception {


		KeyValuePersistentEntity<?, ?> entity = mappingContext
				.getRequiredPersistentEntity(RepositoryPropertyReferenceControllerUnitTests.Sample.class);

		ResourceMappings mappings = new PersistentEntitiesResourceMappings(
				new PersistentEntities(Collections.singleton(mappingContext)));

		ResourceMetadata metadata = spy(
				mappings.getMetadataFor(RepositoryPropertyReferenceControllerUnitTests.Sample.class));

		when(metadata.getSupportedHttpMethods())
				.thenReturn(RepositoryPropertyReferenceControllerUnitTests.AllSupportedHttpMethods.INSTANCE);

		RootResourceInformation information = new RootResourceInformation(metadata, entity, invoker);
		RepositoryEntityController repositoryEntityController = new RepositoryEntityController(repositories,
				restConfiguration, repositoryEntityLinks, assembler, httpHeadersPreparer);

		assertThatExceptionOfType(ResourceNotFoundException.class) //
				.isThrownBy(() -> repositoryEntityController.getItemResource(information, "1", null, null));
	}