Test source usable for all implementations

- Abstracted the source to make it usable for all kinds of
implementations.
- Actual implementation needs to provide createGraph and insertEdge
which are used to create test graphs for the tests.