Add tests to detect negative cycles

- [x] 100% coverage

Depends on #87