Adapt tutorial to cygwin and add test case