Given an array of integers, write a function to find the 2nd max value. Write test cases.