Add assertions in example.cc