Move tests into plugin