@Test public void id() throws Exception { ServiceReference reference = mock(ServiceReference.class); ServiceModel model = new ServiceModel(reference); when(reference.getProperty(Constants.SERVICE_ID)).thenReturn(20l); assertThat(model.getId()).isEqualTo(20l); }
public long getId() { return (Long) this.reference.getProperty(Constants.SERVICE_ID); }
ServiceModel { public long getId() { return (Long) this.reference.getProperty(Constants.SERVICE_ID); } }
ServiceModel { public long getId() { return (Long) this.reference.getProperty(Constants.SERVICE_ID); } ServiceModel(ServiceReference reference); }
ServiceModel { public long getId() { return (Long) this.reference.getProperty(Constants.SERVICE_ID); } ServiceModel(ServiceReference reference); static List<ServiceModel> services(BundleContext context); String getInterfaces(); long getId(); String getProvidingBundle(); Map<String, String> getProperties(); }
ServiceModel { public long getId() { return (Long) this.reference.getProperty(Constants.SERVICE_ID); } ServiceModel(ServiceReference reference); static List<ServiceModel> services(BundleContext context); String getInterfaces(); long getId(); String getProvidingBundle(); Map<String, String> getProperties();  }