Added tests for map optimization