test maximize, minimize methods