-
- protected UriInfo setUpSwaggerForDocGeneration() throws URISyntaxException {
- final UriInfo mockInfo = this.helper.createMockUriInfo(HTTP_URL);
- // We are sharing the global schema service and the mount schema service
- // in our test.
- // OK for testing - real thing would have seperate instances.
- final SchemaContext context = this.helper.createMockSchemaContext();
- final SchemaService schemaService = this.helper.createMockSchemaService(context);
-
- final DOMMountPoint mountPoint = mock(DOMMountPoint.class);
- when(mountPoint.getSchemaContext()).thenReturn(context);
-
- final DOMMountPointService service = mock(DOMMountPointService.class);
- when(service.getMountPoint(INSTANCE_ID)).thenReturn(Optional.of(mountPoint));
- this.swagger.setMountService(service);
- this.swagger.setGlobalSchema(schemaService);
-
- return mockInfo;
- }
-