Converting main methods to tests.