Add test

added 'end' in test to fix error