AnnotationCatalogAccessorProvider extends AbstractAnnotationCatalogAccessorProvider implements InitializingBean { @Override public CatalogAccessor getCatalogAccessor() { return catalogAccessor; } AnnotationCatalogAccessorProvider(BeanExpressionResolver expressionResolver,
                                             BeanExpressionContext expressionContext); @Override CatalogAccessor getCatalogAccessor(); @Override void afterPropertiesSet();  }
@Test(expectedExceptions = NotFoundException.class) public void serviceNotExist() { getProvider().getCatalogAccessor().getServiceAccessor("1234"); }
@Test public void catalog() { final CatalogAccessor catalogAccessor = getProvider().getCatalogAccessor(); final BrokerServiceAccessor serviceAccessor = catalogAccessor.getServiceAccessor(SERVICE_ID); final CatalogService serviceDescription = serviceAccessor.getServiceDescription(); assertEquals(SERVICE_ID, serviceDescription.getId()); assertEquals(SERVICE_NAME, serviceDescription.getName()); assertEquals(SERVICE_DESCRIPTION, serviceDescription.getDescription()); assertEquals(1, serviceDescription.getPlans().size()); assertNull(serviceDescription.getDashboardClient()); final Plan plan = serviceDescription.getPlans().get(0); assertEquals(PLAN_ID, plan.getId()); assertEquals(PLAN_NAME, plan.getName()); assertEquals(PLAN_DESCRIPTION, plan.getDescription()); final ServiceDashboardClient dashboardClient = catalogAccessor.getServiceAccessor(SERVICE_ID_2).getServiceDescription().getDashboardClient(); assertNotNull(dashboardClient); assertEquals(DASHBOARD_CLIENT_ID, dashboardClient.getId()); assertEquals(DASHBOARD_SECRET, dashboardClient.getSecret()); assertEquals(DASHBOARD_URI, dashboardClient.getRedirectUri()); }