### Question:
JsonCrudService { public UUID create(String collectionName, ObjectNode input, User user) throws InvalidCollectionException, IOException, PermissionFetchingException { final Collection collection = mappings.getCollection(collectionName) .orElseThrow(() -> new InvalidCollectionException(collectionName)); try { if (collection.isRelationCollection()) { return createRelation(collection, input, user); } else { return createEntity(collection, input, user); } } catch (PermissionFetchingException e) { throw new IOException(e.getMessage()); } } JsonCrudService(Vres mappings, UserValidator userValidator, UrlGenerator relationUrlFor,
                         TimbuctooActions timDbAccess); UUID create(String collectionName, ObjectNode input, User user); JsonNode get(String collectionName, UUID id); JsonNode get(String collectionName, UUID id, Integer rev); List<ObjectNode> getCollection(String collectionName, int rows, int start, boolean withRelations); void replace(String collectionName, UUID id, ObjectNode data, User user); void delete(String collectionName, UUID id, User user); void addTypeToEntity(UUID id, String typeToAdd); void moveEdges(int fromVertex, int toVertex);  }### Answer:
@Test(expected = InvalidCollectionException.class) public void createThrowsAnInvalidCollectionExceptionWhenTheCollectionIsUnknown() throws Exception { JsonCrudService instance = createInstanceWithoutKnownCollections(); instance.create("unknown_collection", null, null); }