### Question:
JsonViewServlets extends SlingAllMethodsServlet implements BundleListener { @Deactivate protected void deactivate() { this.context.getBundleContext().removeBundleListener(this); }  void refresh(); @Override void init(); @Override void destroy(); @Override void bundleChanged(BundleEvent event);  }### Answer:
@Test public void testRegistrationAsBundleListener() { verifyJsonViewServletsIsAddedAsBundleListener(); deactivate(); verifyJsonViewServletsAreRemovedAsBundleListener(); }