add tests to improve test coverage

Added tests which cover cases with default settings, the panic in
Gradient, and one where more workers are asked for than can be used.
Test coverage is now 100%.