Move tests into test file