Added tests to cover legacy and fluent api