@Test public void eventBodyTest() throws RedisSerializerException { Serializer serializer = new PlainSerializer(); byte[] input = new byte[] { '1', '2', '3', '4', '5' }; Map<String, String> headers = new HashMap<String, String>(); headers.put("bogus", "reallybogus"); Event event = new SimpleEvent(); event.setHeaders(headers); event.setBody(input); byte[] output = serializer.serialize(event); Assert.assertEquals(input.length, output.length); for (int i = 0; i < input.length; i++) { Assert.assertEquals(input[i], output[i]); } }
public byte[] serialize(Event event) throws RedisSerializerException { if (event == null) { throw new RedisSerializerException("Event cannot be null"); } return event.getBody(); }
PlainSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { if (event == null) { throw new RedisSerializerException("Event cannot be null"); } return event.getBody(); } }
PlainSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { if (event == null) { throw new RedisSerializerException("Event cannot be null"); } return event.getBody(); }  }
PlainSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { if (event == null) { throw new RedisSerializerException("Event cannot be null"); } return event.getBody(); }  void configure(Context context); void configure(ComponentConfiguration conf); byte[] serialize(Event event); }
PlainSerializer implements Serializer { public byte[] serialize(Event event) throws RedisSerializerException { if (event == null) { throw new RedisSerializerException("Event cannot be null"); } return event.getBody(); }  void configure(Context context); void configure(ComponentConfiguration conf); byte[] serialize(Event event);  }