rearranged code in MapperTest