The Supreme Court has heard arguments for and against gay marriage, and a decision is expected by the end of June.