@Test(expected = Exception.class) public void testMappingWithUnescapedXmlSpecialCharacter() throws Exception { xmlRecord = new XmlRecord(header, "<website name='google' url='http: XmlRecordMapper<Website> xmlRecordMapper = new XmlRecordMapper<>(Website.class); xmlRecordMapper.processRecord(xmlRecord); }
@Override @SuppressWarnings(value = "unchecked") public Record<P> processRecord(final Record<String> record) throws Exception { P unmarshalledObject = (P) jaxbUnmarshaller.unmarshal(new ByteArrayInputStream(record.getPayload().getBytes())); return new GenericRecord<>(record.getHeader(), unmarshalledObject); }
XmlRecordMapper implements RecordMapper<String, P> { @Override @SuppressWarnings(value = "unchecked") public Record<P> processRecord(final Record<String> record) throws Exception { P unmarshalledObject = (P) jaxbUnmarshaller.unmarshal(new ByteArrayInputStream(record.getPayload().getBytes())); return new GenericRecord<>(record.getHeader(), unmarshalledObject); } }
XmlRecordMapper implements RecordMapper<String, P> { @Override @SuppressWarnings(value = "unchecked") public Record<P> processRecord(final Record<String> record) throws Exception { P unmarshalledObject = (P) jaxbUnmarshaller.unmarshal(new ByteArrayInputStream(record.getPayload().getBytes())); return new GenericRecord<>(record.getHeader(), unmarshalledObject); } XmlRecordMapper(final Class<P> type);  XmlRecordMapper(final Class<P> type, final Path xsd);  XmlRecordMapper(final Unmarshaller unmarshaller); }
XmlRecordMapper implements RecordMapper<String, P> { @Override @SuppressWarnings(value = "unchecked") public Record<P> processRecord(final Record<String> record) throws Exception { P unmarshalledObject = (P) jaxbUnmarshaller.unmarshal(new ByteArrayInputStream(record.getPayload().getBytes())); return new GenericRecord<>(record.getHeader(), unmarshalledObject); } XmlRecordMapper(final Class<P> type);  XmlRecordMapper(final Class<P> type, final Path xsd);  XmlRecordMapper(final Unmarshaller unmarshaller); @Override @SuppressWarnings(value = "unchecked") Record<P> processRecord(final Record<String> record); }
XmlRecordMapper implements RecordMapper<String, P> { @Override @SuppressWarnings(value = "unchecked") public Record<P> processRecord(final Record<String> record) throws Exception { P unmarshalledObject = (P) jaxbUnmarshaller.unmarshal(new ByteArrayInputStream(record.getPayload().getBytes())); return new GenericRecord<>(record.getHeader(), unmarshalledObject); } XmlRecordMapper(final Class<P> type);  XmlRecordMapper(final Class<P> type, final Path xsd);  XmlRecordMapper(final Unmarshaller unmarshaller); @Override @SuppressWarnings(value = "unchecked") Record<P> processRecord(final Record<String> record);  }