Search in sources :

Example 1 with MetadataFilterImpl

use of com.adaptris.core.metadata.MetadataFilterImpl in project interlok by adaptris.

the class CreateQueryStringFromMetadataTest method testService_WithException.

@Test
public void testService_WithException() throws Exception {
    AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage();
    CreateQueryStringFromMetadata service = createService().withMetadataFilter(new MetadataFilterImpl() {

        @Override
        public MetadataCollection filter(MetadataCollection original) {
            throw new RuntimeException();
        }
    });
    try {
        execute(service, msg);
        fail();
    } catch (Exception expected) {
    }
}
Also used : AdaptrisMessage(com.adaptris.core.AdaptrisMessage) MetadataCollection(com.adaptris.core.MetadataCollection) MetadataFilterImpl(com.adaptris.core.metadata.MetadataFilterImpl) Test(org.junit.Test)

Aggregations

AdaptrisMessage (com.adaptris.core.AdaptrisMessage)1 MetadataCollection (com.adaptris.core.MetadataCollection)1 MetadataFilterImpl (com.adaptris.core.metadata.MetadataFilterImpl)1 Test (org.junit.Test)1