use of org.eclipse.smarthome.core.items.MetadataProvider in project smarthome by eclipse.
the class ItemResourceOSGiTest method testRemoveMetadata_unmanagedMetadata.
@Test
public void testRemoveMetadata_unmanagedMetadata() {
MetadataProvider provider = mock(MetadataProvider.class);
when(provider.getAll()).thenReturn(Collections.singleton(new Metadata(new MetadataKey("namespace", ITEM_NAME1), "some value", null)));
registerService(provider);
Response response = itemResource.removeMetadata(ITEM_NAME1, "namespace");
assertEquals(409, response.getStatus());
}
Aggregations