Create encoders randomly and with swapping (plus tests)