Using factory at decoder test