GlobalConfigResourceImpl implements GlobalConfigResource { @Timed @Override public ConfigProperty getPropertyByName(final String propertyPath) { RestUtil.requireNonNull(propertyPath, "propertyPath not supplied"); final Optional<ConfigProperty> optConfigProperty = globalConfigService.fetch( PropertyPath.fromPathString(propertyPath)); return optConfigProperty.orElseThrow(NotFoundException::new); } @Inject  GlobalConfigResourceImpl(final GlobalConfigService globalConfigService,
                             final NodeService nodeService,
                             final UiConfig uiConfig,
                             final NodeInfo nodeInfo,
                             final WebTargetFactory webTargetFactory,
                             final UriFactory uriFactory); @Timed @Override ListConfigResponse list(final GlobalConfigCriteria criteria); @Timed @Override ListConfigResponse listByNode(final String nodeName,
                                         final GlobalConfigCriteria criteria); @Timed @Override ConfigProperty getPropertyByName(final String propertyPath); @Timed OverrideValue<String> getYamlValueByName(final String propertyPath); @Timed @Override OverrideValue<String> getYamlValueByNodeAndName(final String propertyName,
                                                           final String nodeName); @Timed @Override ConfigProperty create(final ConfigProperty configProperty); @Timed @Override ConfigProperty update(final String propertyName, final ConfigProperty configProperty); @Timed @Override UiConfig fetchUiConfig();  }
@Test void getPropertyByName() { initNodes(); final String subPath = ResourcePaths.buildPath( GlobalConfigResource.PROPERTIES_SUB_PATH, "some.other.property"); final ConfigProperty expectedResponse = CONFIG_PROPERTY_2; final ConfigProperty listConfigResponse = doGetTest( subPath, ConfigProperty.class, expectedResponse); }