Fixed a bug and added tests

Added a few tests for IsSolvable method and fixed a bug in IsSolvable
method.