Adding test for withInstance