Congressional map raises Democrats’ hopes, legal test ahead