Define contexts test

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