Add basic tests for optimizers