Adjust typehinting and test object mock building