completely dynamic test of encode nd decode