Add more tests for newInstance()