### Question:
CamelTransformer extends BaseTransformer { @Override public Object transform(final Object from) { if (from == null) { return null; } final Class<?> toType = QNameUtil.toJavaMessageType(getTo()); return _camelConverter.convert(toType, from); } CamelTransformer();  CamelTransformer(final QName from, final QName to); @Override Object transform(final Object from);  }### Answer:
@Test public void genericFileToString() throws Exception { final QName genericFileType = new QName("java:org.apache.camel.component.file.GenericFile"); final QName stringType = JavaTypes.toMessageType(String.class); final CamelTransformer camelTransformer = new CamelTransformer(); camelTransformer.setFrom(genericFileType); camelTransformer.setTo(stringType); final GenericFile<File> genericFile = new GenericFile<File>(); genericFile.setBody("dummy file content"); final Object transform = camelTransformer.transform(genericFile); assertThat(transform, is(instanceOf(String.class))); }