Unit tests for median method.