test_class.file: api/src/test/java/org/apache/sling/cms/publication/IsPublishableResourceTypeTest.java
test_class.identifier: IsPublishableResourceTypeTest
test_case.body: @Test
      public void testTypes(){
          IsPublishableResourceType predicate = new IsPublishableResourceType();
          ResourceTree folder = mockResource(JcrConstants.NT_FOLDER);
          ResourceTree slingFolder = mockResource(JcrResourceConstants.NT_SLING_FOLDER);
          ResourceTree orderedFolder = mockResource(JcrResourceConstants.NT_SLING_ORDERED_FOLDER);
          ResourceTree slingFile = mockResource(CMSConstants.NT_FILE);
          ResourceTree site = mockResource(CMSConstants.NT_SITE);
          ResourceTree page = mockResource(CMSConstants.NT_PAGE);
          ResourceTree config = mockResource(CMSConstants.NT_CONFIG);
          ResourceTree component = mockResource("a/resource/type");
  
  
          assertFalse(predicate.test(null));
          assertFalse(predicate.test(folder));
          assertFalse(predicate.test(slingFolder));
          assertFalse(predicate.test(orderedFolder));
          assertTrue(predicate.test(slingFile));
          assertFalse(predicate.test(site));
          assertTrue(predicate.test(page));
          assertFalse(predicate.test(config));
          assertFalse(predicate.test(component));
      }
test_case.class_method_signature: IsPublishableResourceTypeTest.testTypes()
test_case.full_signature: @Test public void testTypes()
test_case.identifier: testTypes
test_case.invocations: mockResource mockResource mockResource mockResource mockResource mockResource mockResource mockResource assertFalse test assertFalse test assertFalse test assertFalse test assertTrue test assertFalse test assertTrue test assertFalse test assertFalse test
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTypes()
focal_class.file: api/src/main/java/org/apache/sling/cms/publication/IsPublishableResourceType.java
focal_class.identifier: IsPublishableResourceType
focal_class.interfaces: implements Predicate<ResourceTree>
focal_class.class_method_signature: IsPublishableResourceType.test(ResourceTree rt)
focal_class.full_signature: @Override public boolean test(ResourceTree rt)
focal_class.identifier: test
focal_class.modifiers: @Override public
focal_class.parameters: (ResourceTree rt)
focal_class.return: boolean
focal_class.signature: boolean test(ResourceTree rt)
focal_method.body: @Override
      public boolean test(ResourceTree rt) {
          return Optional.ofNullable(rt).map(ResourceTree::getResource).map(Resource::getResourceType)
                  .map(type -> CMSConstants.NT_FILE.equals(type) || CMSConstants.NT_PAGE.equals(type)).orElse(false);
      }
focal_method.class_method_signature: IsPublishableResourceType.test(ResourceTree rt)
focal_method.full_signature: @Override public boolean test(ResourceTree rt)
focal_method.identifier: test
focal_method.invocations: orElse map map map ofNullable equals equals
focal_method.modifiers: @Override public
focal_method.parameters: (ResourceTree rt)
focal_method.return: boolean
focal_method.signature: boolean test(ResourceTree rt)