GraphHelper { public Iterator<AtlasEdge> getOutGoingEdgesByLabel(AtlasVertex instanceVertex, String edgeLabel) { return getAdjacentEdgesByLabel(instanceVertex, AtlasEdgeDirection.OUT, edgeLabel); } @VisibleForTesting  GraphHelper(AtlasGraph graph); static GraphHelper getInstance(); AtlasVertex createVertexWithIdentity(ITypedReferenceableInstance typedInstance, Set<String> superTypeNames); AtlasVertex createVertexWithoutIdentity(String typeName, Id typedInstanceId, Set<String> superTypeNames); AtlasEdge getOrCreateEdge(AtlasVertex outVertex, AtlasVertex inVertex, String edgeLabel); AtlasEdge getEdgeByEdgeId(AtlasVertex outVertex, String edgeLabel, String edgeId); AtlasVertex findVertex(Object... args); AtlasEdge findEdge(Object... args); Iterator<AtlasEdge> getAdjacentEdgesByLabel(AtlasVertex instanceVertex, AtlasEdgeDirection direction, final String edgeLabel); Iterator<AtlasEdge> getIncomingEdgesByLabel(AtlasVertex instanceVertex, String edgeLabel); Iterator<AtlasEdge> getOutGoingEdgesByLabel(AtlasVertex instanceVertex, String edgeLabel); AtlasEdge getEdgeForLabel(AtlasVertex vertex, String edgeLabel, AtlasRelationshipEdgeDirection edgeDirection); Iterator<AtlasEdge> getEdgesForLabel(AtlasVertex vertex, String edgeLabel, AtlasRelationshipEdgeDirection edgeDirection); AtlasEdge getEdgeForLabel(AtlasVertex vertex, String edgeLabel); AtlasEdge getEdgeForLabel(AtlasVertex vertex, String edgeLabel, AtlasEdgeDirection edgeDirection); static String vertexString(final AtlasVertex vertex); static String edgeString(final AtlasEdge edge); static void setProperty(T element, String propertyName, Object value); static T getSingleValuedProperty(AtlasElement element, String propertyName, Class<T> clazz); static Object getProperty(AtlasVertex<?,?> vertex, String propertyName); static Object getProperty(AtlasEdge<?,?> edge, String propertyName); static void addProperty(AtlasVertex vertex, String propertyName, Object value); void removeEdge(AtlasEdge edge); void removeVertex(AtlasVertex vertex); AtlasVertex getVertexForGUID(String guid); AtlasEdge getEdgeForGUID(String guid); Map<String, AtlasVertex> getVerticesForPropertyValues(String property, List<String> values); Map<String, AtlasVertex> getVerticesForGUIDs(List<String> guids); static String getQualifiedNameForMapKey(String prefix, String key); static String getQualifiedFieldName(ITypedInstance typedInstance, AttributeInfo attributeInfo); static String getQualifiedFieldName(IDataType dataType, String attributeName); static String getTraitLabel(String typeName, String attrName); static List<String> getTraitNames(AtlasVertex<?,?> entityVertex); static List<String> getSuperTypeNames(AtlasVertex<?,?> entityVertex); static String getEdgeLabel(ITypedInstance typedInstance, AttributeInfo aInfo); static String getEdgeLabel(IDataType dataType, AttributeInfo aInfo); static Id getIdFromVertex(String dataTypeName, AtlasVertex vertex); static Id getIdFromVertex(AtlasVertex vertex); static String getGuid(AtlasElement element); static String getTypeName(AtlasElement element); static Id.EntityState getState(AtlasElement element); static Integer getVersion(AtlasElement element); static String getStateAsString(AtlasElement element); static Status getStatus(AtlasElement element); static AtlasRelationship.Status getEdgeStatus(AtlasElement element); static String getCreatedByAsString(AtlasElement element); static String getModifiedByAsString(AtlasElement element); static long getCreatedTime(AtlasElement element); static long getModifiedTime(AtlasElement element); AtlasVertex getVertexForInstanceByUniqueAttribute(ClassType classType, IReferenceableInstance instance); List<AtlasVertex> getVerticesForInstancesByUniqueAttribute(ClassType classType, List<? extends IReferenceableInstance> instancesForClass); Set<VertexInfo> getCompositeVertices(AtlasVertex entityVertex); static ITypedReferenceableInstance[] deserializeClassInstances(TypeSystem typeSystem, String entityInstanceDefinition); static ITypedReferenceableInstance getTypedReferenceableInstance(TypeSystem typeSystem, Referenceable entityInstance); static boolean isReference(IDataType type); static void setArrayElementsProperty(IDataType elementType, AtlasVertex instanceVertex, String propertyName, List<Object> values); static void setMapValueProperty(IDataType elementType, AtlasVertex instanceVertex, String propertyName, Object value); static Object getMapValueProperty(IDataType elementType, AtlasVertex instanceVertex, String propertyName); static Object getMapValueProperty(AtlasType elementType, AtlasVertex instanceVertex, String propertyName); static List<Object> getArrayElementsProperty(AtlasType elementType, AtlasVertex instanceVertex, String propertyName); static List<Object> getArrayElementsProperty(IDataType elementType, AtlasVertex instanceVertex, String propertyName); static void dumpToLog(final AtlasGraph<?,?> graph); static String string(ITypedReferenceableInstance instance); static String string(AtlasVertex<?,?> vertex); static String getVertexDetails(AtlasVertex<?,?> vertex); static String string(AtlasEdge<?,?> edge); static String getEdgeDetails(AtlasEdge<?,?> edge); static String encodePropertyKey(String key); static String decodePropertyKey(String key); Object getVertexId(String guid); static AttributeInfo getAttributeInfoForSystemAttributes(String field); static boolean elementExists(AtlasElement v); static void setListPropertyFromElementIds(AtlasVertex<?, ?> instanceVertex, String propertyName,
            List<AtlasElement> elements); static void setPropertyFromElementId(AtlasVertex<?, ?> instanceVertex, String propertyName,
            AtlasElement value); static void setListProperty(AtlasVertex instanceVertex, String propertyName, ArrayList<String> value); static List<String> getListProperty(AtlasVertex instanceVertex, String propertyName); String getRelationshipDefName(AtlasVertex entityVertex, AtlasEntityType entityType, String attributeName); AtlasRelationshipDef getRelationshipDef(AtlasVertex entityVertex, AtlasEntityType entityType, String attributeName); static boolean isRelationshipEdge(AtlasEdge edge); static AtlasObjectId getReferenceObjectId(AtlasEdge edge, AtlasRelationshipEdgeDirection relationshipDirection); static AtlasObjectId getCurrentObjectId(AtlasEdge edge, AtlasRelationshipEdgeDirection relationshipDirection); static final String EDGE_LABEL_PREFIX; static final String RETRY_COUNT; static final String RETRY_DELAY; static long retrySleepTimeMillis; @VisibleForTesting
    //Keys copied from com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker
    //Titan checks that these chars are not part of any keys. So, encoding...
    static BiMap<String, String> RESERVED_CHARS_ENCODE_MAP; }
@Test public void testGetOutgoingEdgesByLabel() throws Exception { AtlasGraph graph = TestUtils.getGraph(); AtlasVertex v1 = graph.addVertex(); AtlasVertex v2 = graph.addVertex(); graph.addEdge(v1, v2, "l1"); graph.addEdge(v1, v2, "l2"); Iterator<AtlasEdge> iterator = GraphHelper.getInstance().getOutGoingEdgesByLabel(v1, "l1"); assertTrue(iterator.hasNext()); assertTrue(iterator.hasNext()); assertNotNull(iterator.next()); assertNull(iterator.next()); assertFalse(iterator.hasNext()); assertFalse(iterator.hasNext()); }