### Question:
ResourceReferenceConverter { protected Resource validateAndGetReference(String referenceUri, String ownersUri) throws IllegalParameterValueException { if (referenceUri == null) { throw new MandatoryParameterNotFoundException("resourceReference.uri"); } if (!isAssignable(ownersUri, referenceUri)){ throw new IllegalParameterValueException("resourceReference.uri", referenceUri); } if (referenceUri.isEmpty() || !referenceUri.startsWith(Folder.SEPARATOR)) { throw new ReferencedResourceNotFoundException(referenceUri, "uri"); } final Resource resource = repositoryService.getResource(ExecutionContextImpl.getRuntimeExecutionContext(), referenceUri); if (resource == null) { throw new ReferencedResourceNotFoundException(referenceUri, "uri"); } else if (!restrictions.isEmpty()) { final ClientResource clientTargetObject = resourceConverterProvider.getToClientConverter(resource).toClient(resource, null); for (ClientReferenceRestriction restriction : restrictions) { restriction.validateReference(clientTargetObject); } } return resource; } ResourceReferenceConverter(ResourceConverterProvider resourceConverterProvider,
            RepositoryService repositoryService, PermissionsService permissionsService, RepositoryConfiguration configuration, ClientReferenceRestriction... restriction); ResourceReferenceConverter<T> addReferenceRestriction(ClientReferenceRestriction restriction); @SuppressWarnings("unchecked") T toClient(ResourceReference serverObject, ToClientConversionOptions options); ResourceReference toServer(T clientObject,ToServerConversionOptions options); ResourceReference toServer(T clientObject, ResourceReference resultToUpdate, ToServerConversionOptions options);  }### Answer:
@Test(expectedExceptions = MandatoryParameterNotFoundException.class) public void validateReference_uriIsNull_exception() throws Exception { converter.validateAndGetReference(null, options.getOwnersUri()); }
@Test(expectedExceptions = ReferencedResourceNotFoundException.class) public void validateReference_resourceDoesntExist() throws Exception { converter.validateAndGetReference("/test/resource/uri", options.getOwnersUri()); }