### Question:
BaseResourceDefinition implements ResourceDefinition { @Override public List<PostProcessor> getPostProcessors() { List<PostProcessor> listProcessors = new ArrayList<>(); listProcessors.add(new BaseHrefPostProcessor()); return listProcessors; } BaseResourceDefinition(Resource.Type resourceType);  BaseResourceDefinition(Resource.Type resourceType, Resource.Type ... subTypes);  BaseResourceDefinition(Resource.Type resourceType,
                                Collection<Resource.Type> subTypes,
                                Map<DirectiveType, ? extends Collection<String>> directives); @Override Resource.Type getType(); @Override Set<SubResourceDefinition> getSubResourceDefinitions(); @Override List<PostProcessor> getPostProcessors(); @Override Renderer getRenderer(String name); @Override Collection<String> getReadDirectives(); @Override Collection<String> getCreateDirectives(); @Override Collection<String> getUpdateDirectives(); @Override Collection<String> getDeleteDirectives(); @Override boolean equals(Object o); @Override int hashCode(); @Override boolean isCreatable();  }### Answer:
@Test public void testGetPostProcessors() throws AmbariException { BaseResourceDefinition resourceDefinition = getResourceDefinition(); List<ResourceDefinition.PostProcessor> postProcessors = resourceDefinition.getPostProcessors(); Assert.assertEquals(1, postProcessors.size()); ResourceDefinition.PostProcessor processor = postProcessors.iterator().next(); Resource service = new ResourceImpl(Resource.Type.Service); service.setProperty("ServiceInfo/service_name", "Service1"); TreeNode<Resource> parentNode = new TreeNodeImpl<>(null, null, "services"); TreeNode<Resource> serviceNode = new TreeNodeImpl<>(parentNode, service, "service1"); parentNode.setProperty("isCollection", "true"); ResourceProviderFactory factory = createMock(ResourceProviderFactory.class); MaintenanceStateHelper maintenanceStateHelper = createNiceMock(MaintenanceStateHelper.class); AmbariManagementController managementController = createMock(AmbariManagementController.class); RepositoryVersionDAO repositoryVersionDAO = createNiceMock(RepositoryVersionDAO.class); expect(maintenanceStateHelper.isOperationAllowed(anyObject(Resource.Type.class), anyObject(Service.class))).andReturn(true).anyTimes(); ResourceProvider serviceResourceProvider = new ServiceResourceProvider(managementController, maintenanceStateHelper, repositoryVersionDAO); expect( factory.getServiceResourceProvider( anyObject(AmbariManagementController.class))).andReturn(serviceResourceProvider); AbstractControllerResourceProvider.init(factory); replay(factory, managementController, maintenanceStateHelper); processor.process(null, serviceNode, "http: String href = serviceNode.getStringProperty("href"); Assert.assertEquals("http: Resource configGroup = new ResourceImpl(Resource.Type.ConfigGroup); configGroup.setProperty("ConfigGroup/id", "2"); TreeNode<Resource> resourcesNode = new TreeNodeImpl<>(null, null, BaseManagementHandler.RESOURCES_NODE_NAME); TreeNode<Resource> configGroupNode = new TreeNodeImpl<>(resourcesNode, configGroup, "configGroup1"); resourcesNode.setProperty("isCollection", "true"); processor.process(null, configGroupNode, "http: href = configGroupNode.getStringProperty("href"); Assert.assertEquals("http: }