use of ddf.catalog.transformer.attribute.AttributeMetacardTransformer in project ddf by codice.
the class TestActionProviderRegistryProxy method testAttributeTransformer.
@Test
public void testAttributeTransformer() throws MimeTypeParseException {
// given
ActionProviderRegistryProxy proxy = new ActionProviderRegistryProxyTest(mtapf);
when(mockBundleContext.getService(mockServiceReference)).thenReturn(new AttributeMetacardTransformer("metadata", "metadata", new MimeType("text", "xml")));
// when
proxy.bind(mockServiceReference);
// then
verify(mockBundleContext, times(1)).registerService(anyString(), captor.capture(), any(Dictionary.class));
Object value = captor.getValue();
assertThat(value, notNullValue());
assertThat(value instanceof ActionProvider, is(true));
}
Aggregations