@Test public void testMarshallWithoutContainer() { KieServerRegistry kieServerRegistryMock = Mockito.mock(KieServerRegistry.class); MarshallerHelper helper = new MarshallerHelper(kieServerRegistryMock); QueryFilterSpec queryFilterSpec = new QueryFilterSpecBuilder().get(); String marshalledQFS = helper.marshal(MarshallingFormat.JAXB.toString(), queryFilterSpec); String expectedMarshalledQFS = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + "<query-filter-spec>" + "<order-asc>false</order-asc>" + "</query-filter-spec>"; assertThat(marshalledQFS, CompareMatcher.isIdenticalTo(expectedMarshalledQFS).ignoreWhitespace()); }
public String marshal(String containerId, String marshallingFormat, Object entity) { return marshal(containerId, marshallingFormat, entity, ContainerLocatorProvider.get().getLocator()); }
MarshallerHelper { public String marshal(String containerId, String marshallingFormat, Object entity) { return marshal(containerId, marshallingFormat, entity, ContainerLocatorProvider.get().getLocator()); } }
MarshallerHelper { public String marshal(String containerId, String marshallingFormat, Object entity) { return marshal(containerId, marshallingFormat, entity, ContainerLocatorProvider.get().getLocator()); } MarshallerHelper(KieServerRegistry registry); }
MarshallerHelper { public String marshal(String containerId, String marshallingFormat, Object entity) { return marshal(containerId, marshallingFormat, entity, ContainerLocatorProvider.get().getLocator()); } MarshallerHelper(KieServerRegistry registry); KieServerRegistry getRegistry(); String marshal(String containerId, String marshallingFormat, Object entity); String marshal(String containerId, String marshallingFormat, Object entity, ContainerLocator locator); String marshal(String marshallingFormat, Object entity); T unmarshal(String containerId, String data, String marshallingFormat, Class<T> unmarshalType); T unmarshal(String containerId, String data, String marshallingFormat, Class<T> unmarshalType, ContainerLocator locator); T unmarshal(String data, String marshallingFormat, Class<T> unmarshalType); static MarshallingFormat getFormat(String descriptor); }
MarshallerHelper { public String marshal(String containerId, String marshallingFormat, Object entity) { return marshal(containerId, marshallingFormat, entity, ContainerLocatorProvider.get().getLocator()); } MarshallerHelper(KieServerRegistry registry); KieServerRegistry getRegistry(); String marshal(String containerId, String marshallingFormat, Object entity); String marshal(String containerId, String marshallingFormat, Object entity, ContainerLocator locator); String marshal(String marshallingFormat, Object entity); T unmarshal(String containerId, String data, String marshallingFormat, Class<T> unmarshalType); T unmarshal(String containerId, String data, String marshallingFormat, Class<T> unmarshalType, ContainerLocator locator); T unmarshal(String data, String marshallingFormat, Class<T> unmarshalType); static MarshallingFormat getFormat(String descriptor);  }