CLDIDE-2043: add fixes and tests for nonencoded factory builder

@skabashnyuk Please review my changes