tests for TurnCostEncoder