test_class.declarator: ORG_OSGI_SERVICE_HTTP_SERVICE = "org.osgi.service.http.HttpService"
test_class.modifier: private static final
test_class.original_string: private static final String ORG_OSGI_SERVICE_HTTP_SERVICE = "org.osgi.service.http.HttpService";
test_class.type: String
test_class.var_name: ORG_OSGI_SERVICE_HTTP_SERVICE
test_class.declarator: HTTP_PORT = "org.osgi.service.http.port"
test_class.modifier: private static final
test_class.original_string: private static final String HTTP_PORT = "org.osgi.service.http.port";
test_class.type: String
test_class.var_name: HTTP_PORT
test_class.declarator: HTTP_PORT_SECURE = "org.osgi.service.http.port.secure"
test_class.modifier: private static final
test_class.original_string: private static final String HTTP_PORT_SECURE = "org.osgi.service.http.port.secure";
test_class.type: String
test_class.var_name: HTTP_PORT_SECURE
test_class.declarator: bundleContext
test_class.modifier: private @Mock
test_class.original_string: private @Mock BundleContext bundleContext;
test_class.type: BundleContext
test_class.var_name: bundleContext
test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/net/HttpServiceUtilTest.java
test_class.identifier: HttpServiceUtilTest
test_case.body: @Test
      public void shouldReturnHttpServicePortFromSystemProperty() throws InvalidSyntaxException {
          when(bundleContext.getAllServiceReferences(ORG_OSGI_SERVICE_HTTP_SERVICE, null))
                  .thenReturn(new ServiceReference[0]);
          when(bundleContext.getProperty(HTTP_PORT)).thenReturn("9090");
  
          int port = HttpServiceUtil.getHttpServicePort(bundleContext);
  
          assertThat(port, is(9090));
      }
test_case.class_method_signature: HttpServiceUtilTest.shouldReturnHttpServicePortFromSystemProperty()
test_case.full_signature: @Test public void shouldReturnHttpServicePortFromSystemProperty()
test_case.identifier: shouldReturnHttpServicePortFromSystemProperty
test_case.invocations: thenReturn when getAllServiceReferences thenReturn when getProperty getHttpServicePort assertThat is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReturnHttpServicePortFromSystemProperty()
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/net/HttpServiceUtil.java
focal_class.identifier: HttpServiceUtil
focal_class.class_method_signature: HttpServiceUtil.HttpServiceUtil()
focal_class.full_signature: private  HttpServiceUtil()
focal_class.identifier: HttpServiceUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  HttpServiceUtil()
focal_class.class_method_signature: HttpServiceUtil.getHttpServicePort(final BundleContext bc)
focal_class.full_signature: public static int getHttpServicePort(final BundleContext bc)
focal_class.identifier: getHttpServicePort
focal_class.modifiers: public static
focal_class.parameters: (final BundleContext bc)
focal_class.return: int
focal_class.signature: int getHttpServicePort(final BundleContext bc)
focal_class.class_method_signature: HttpServiceUtil.getHttpServicePortSecure(final BundleContext bc)
focal_class.full_signature: public static int getHttpServicePortSecure(final BundleContext bc)
focal_class.identifier: getHttpServicePortSecure
focal_class.modifiers: public static
focal_class.parameters: (final BundleContext bc)
focal_class.return: int
focal_class.signature: int getHttpServicePortSecure(final BundleContext bc)
focal_class.class_method_signature: HttpServiceUtil.getHttpServicePortProperty(final BundleContext bc, final String propertyName)
focal_class.full_signature: private static int getHttpServicePortProperty(final BundleContext bc, final String propertyName)
focal_class.identifier: getHttpServicePortProperty
focal_class.modifiers: private static
focal_class.parameters: (final BundleContext bc, final String propertyName)
focal_class.return: int
focal_class.signature: int getHttpServicePortProperty(final BundleContext bc, final String propertyName)
focal_method.body: public static int getHttpServicePort(final BundleContext bc) {
          return getHttpServicePortProperty(bc, "org.osgi.service.http.port");
      }
focal_method.class_method_signature: HttpServiceUtil.getHttpServicePort(final BundleContext bc)
focal_method.full_signature: public static int getHttpServicePort(final BundleContext bc)
focal_method.identifier: getHttpServicePort
focal_method.invocations: getHttpServicePortProperty
focal_method.modifiers: public static
focal_method.parameters: (final BundleContext bc)
focal_method.return: int
focal_method.signature: int getHttpServicePort(final BundleContext bc)