add test code for generic variants
add threadlocal test case
more whitespace