test end behaviour