added unit test for thread manager; but it is not working yet
fixed failing assert