setProgressAndMax: Add assertions for values

Lets make sure that progress and max are set to the correct values in
addition to not throwing an Exception.