Update test to use new optimizer api