### Question:
TinkerPopOperations implements DataStoreOperations { @Override public List<RelationType> getRelationTypes() { return traversal.V().has(T.label, LabelP.of("relationtype")).toList().stream() .map(RelationType::relationType).collect(toList()); } TinkerPopOperations(TinkerPopGraphManager graphManager);   TinkerPopOperations(TinkerPopGraphManager graphManager, ChangeListener listener,
                      GremlinEntityFetcher entityFetcher, Vres mappings, IndexHandler indexHandler); private  TinkerPopOperations(TinkerPopGraphManager graphManager, Function<IndexHandler, ChangeListener> listener,
                              Function<IndexHandler, GremlinEntityFetcher> entityFetcher, Vres mappings,
                              IndexHandler indexHandler); @Override byte[] getVreImageBlob(String vreName); @Override void success(); @Override void rollback(); @Override void close(); @Override UUID acceptRelation(Collection collection, CreateRelation createRelation); @Override void createEntity(Collection col, Optional<Collection> baseCollection, CreateEntity input); @Override ReadEntity getEntity(UUID id, Integer rev, Collection collection,
                              CustomEntityProperties customEntityProperties,
                              CustomRelationProperties customRelationProperties); @Override List<RelationType> getRelationTypes(); @Override DataStream<ReadEntity> getCollection(Collection collection, int start, int rows,
                                              boolean withRelations,
                                              CustomEntityProperties customEntityProperties,
                                              CustomRelationProperties customRelationProperties); @Override List<QuickSearchResult> doQuickSearch(Collection collection, QuickSearch quickSearch, int limit); @Override List<QuickSearchResult> doKeywordQuickSearch(Collection collection, String keywordType,
                                                      QuickSearch quickSearch, int limit); @Override int replaceEntity(Collection collection, UpdateEntity updateEntity); @Override void replaceRelation(Collection collection, UpdateRelation updateRelation); @Override int deleteEntity(Collection collection, UUID id, Change modified); @Override Vres loadVres(); @Override boolean databaseIsEmptyExceptForMigrations(); @Override void initDb(Vres mappings, RelationType... relationTypes); @Override void saveRelationTypes(RelationType... relationTypes); @Override void saveVre(Vre vre); @Override void addPid(UUID id, int rev, URI pidUri); @Override void addTypeToEntity(UUID id, Collection typeToAdd); @Override void moveEdges(int fromVertexId, int toVertexId);  }### Answer:
@Test public void getRelationTypesReturnsAllTheRelationTypesInTheDatabase() { UUID id1 = UUID.randomUUID(); UUID id2 = UUID.randomUUID(); TinkerPopGraphManager graphManager = newGraph() .withVertex(v -> v .withTimId(id1) .withType("relationtype") .withProperty("rdfUri", "http: .withProperty("rev", 2) .isLatest(true) .withLabel("relationtype") ) .withVertex(v -> v .withTimId(id2) .withType("relationstype") .withVre("test") .withProperty("rdfUri", "http: .isLatest(false) .withProperty("rev", 1) .withLabel("relationtype") ) .withVertex(v -> v .withTimId(UUID.randomUUID()) .withType("othertype") .withVre("test") .withProperty("rdfUri", "http: .isLatest(false) .withProperty("rev", 1) .withLabel("othertype") ) .wrap(); Vres vres = createConfiguration(); TinkerPopOperations instance = forGraphWrapperAndMappings(graphManager, vres); List<RelationType> relationTypes = instance.getRelationTypes(); assertThat(relationTypes, hasSize(2)); }