extend package mapping and add unit tests