AdjacencyMap { public boolean containsSource(final Object source) { return edgeGraph.rowKeySet().contains(source); }  Set<Edge> getEdges(final Object source, final Object destination); Set<Edge> putEdges(final Object source, final Object destination, final Set<Edge> set); Set<Edge> putEdge(final Object source, final Object destination, final Edge edge); Set<Object> getDestinations(final Object source); Set<Object> getSources(final Object destination); Set<Object> getAllSources(); Set<Object> getAllDestinations(); void removeAllWithDestination(final Object destination); boolean containsSource(final Object source); boolean containsDestination(final Object destination); String toStringFull(); @Override String toString();  }
@Test public void shouldContainSource() { final AdjacencyMap adjacencyMap = getAdjacencyMap(); final boolean result = adjacencyMap.containsSource(2); assertThat(result, is(true)); }
@Test public void shouldNotContainSource() { final AdjacencyMap adjacencyMap = getAdjacencyMap(); final boolean result = adjacencyMap.containsSource(7); assertThat(result, is(false)); }