KnowledgeRepository basic functionality and tests