@Test
public void testUpdated() throws Exception {

  Dictionary<String, String> properties = new Hashtable<>();
  properties.put(TimelinePreviewsServiceImpl.OPT_RESOLUTION_X, "200");
  properties.put(TimelinePreviewsServiceImpl.OPT_RESOLUTION_Y, "90");
  properties.put(TimelinePreviewsServiceImpl.OPT_OUTPUT_FORMAT, ".jpg");
  properties.put(TimelinePreviewsServiceImpl.OPT_MIMETYPE, "image/jpg");
  ServiceRegistry serviceRegistry = EasyMock.createNiceMock(ServiceRegistry.class);
  EasyMock.expect(serviceRegistry.getHostRegistrations()).andReturn(new ArrayList());
  EasyMock.replay(serviceRegistry);
  TimelinePreviewsServiceImpl instance = new TimelinePreviewsServiceImpl();
  instance.setServiceRegistry(serviceRegistry);
  try {
    instance.updated(properties);
    // we cannot check private fields but it should not throw any exception
    assertEquals(200, instance.resolutionX);
    assertEquals(90, instance.resolutionY);
    assertEquals(".jpg", instance.outputFormat);
    assertEquals("image/jpg", instance.mimetype);
  } catch (Exception e) {
    fail("updated method should not throw any exceptions but has thrown: " + ExceptionUtils.getStackTrace(e));
  }
}