Update test to cover factory