Documentation and test map returning promise