added test for inValid after & before methods