Improve: divide tests into unit and integration.