added tests for candidate class