Added next stub test and some test refactoring