private <T> void unmarshalAndMarshal(Class<T> type, java.lang.String xmlFileName, java.lang.String expectedFile) throws Exception {
Object object = JaxbOpenejbJar2.unmarshal(type, getInputStream(xmlFileName));
String actual = JaxbOpenejbJar2.marshal(type, object);
if (xmlFileName.equals(expectedFile)) {
String sourceXml = readContent(getInputStream(xmlFileName));
assertEquals(sourceXml, actual);
} else {
String expected = readContent(getInputStream(expectedFile));
assertEquals(expected, actual);
}
}