finished future flatmap test cases