### Question:
SyslogAppender { @Activate @SuppressWarnings("squid:S1149") protected void activate(final BundleContext ctx, final Map<String, Object> properties) { this.appender = constructAppender(properties); final String[] loggers = PropertiesUtil.toStringArray(properties.get(PROP_LOGGERS), new String[] {ROOT}); Dictionary<String, Object> props = new Hashtable<>(); props.put(PROP_LOGGERS, loggers); appenderRegistration = ctx.registerService(Appender.class.getName(), appender, props); }    }### Answer:
@Test public void testActivate() { SyslogAppender appender = new SyslogAppender(); MockBundleContext ctx = new UnregMockBundleContext(null); appender.activate(ctx, createConfig("localhost", 42, "test", "USER", null, false, "my.logger")); appender.deactivate(); }