Added define methods contexts tests

Added two tests to verify internal context of map.define method, one for serialize function and another for all methods.