public void testEncode() throws Exception {
GenericControlRecord gcr = new GenericControlRecord(new GcTargetRecord(new UriRecord(
"file://localhost/Appli/CustomerBonus")));
gcr.setAction(new GcActionRecord(new TextRecord("add", Charset.forName("utf8"), Locale.US)));
gcr.setData(new GcDataRecord(new TextRecord("500", Locale.US)));
byte[] encodedGcr = messageEncoder.encodeSingle(gcr);
assertArrayEquals(GenericControlRecordDecoderTest.payload, encodedGcr);
}