Add tests for parsing input into a sparse graph