Fix stream state testing example. Closes #18.