NodeExamples extends AbstractExamples { public NodeResponse getNodeResponseWithAllFields() { NodeResponse nodeResponse = new NodeResponse(); nodeResponse.setUuid(NODE_DELOREAN_UUID); NodeReference parentNodeReference = new NodeReference(); parentNodeReference.setUuid(NODE_ROOT_UUID); parentNodeReference.setDisplayName("parentNodeDisplayName"); nodeResponse.setParentNode(parentNodeReference); nodeResponse.setCreated(createOldTimestamp()); nodeResponse.setEdited(createNewTimestamp()); nodeResponse.setCreator(createUserReference()); nodeResponse.setTags(Arrays.asList(new TagReference().setName("red").setUuid(TAG_RED_UUID).setTagFamily("colors"))); nodeResponse.setPath(VersionHandler.CURRENT_API_BASE_PATH + "/yourProject/webroot/Images"); Map<String, PublishStatusModel> languageInfo = new HashMap<>(); languageInfo.put("de", new PublishStatusModel().setVersion("1.0").setPublished(true).setPublishDate(createOldTimestamp()).setPublisher( createUserReference())); languageInfo.put("en", new PublishStatusModel().setVersion("1.1").setPublished(false).setPublishDate(createOldTimestamp()).setPublisher( createUserReference())); nodeResponse.setAvailableLanguages(languageInfo); HashMap<String, String> languagePaths = new HashMap<>(); languagePaths.put("en", VersionHandler.CURRENT_API_BASE_PATH + "/yourProject/webroot/Images"); languagePaths.put("de", VersionHandler.CURRENT_API_BASE_PATH + "/yourProject/webroot/Bilder"); nodeResponse.setLanguagePaths(languagePaths); nodeResponse.setChildrenInfo(new HashMap<>()); nodeResponse.getChildrenInfo().put("blogpost", new NodeChildrenInfo().setCount(1).setSchemaUuid(UUID_2)); nodeResponse.getChildrenInfo().put("folder", new NodeChildrenInfo().setCount(5).setSchemaUuid(UUID_3)); FieldMap fields = new FieldMapImpl(); fields.put("name", createStringField("Name for language tag de-DE")); fields.put("filename", createStringField("dummy-content.de.html")); fields.put("teaser", createStringField("Dummy teaser for de-DE")); fields.put("content", createHtmlField("Content for language tag de-DE")); fields.put("relatedProduct", createNodeField(UUID_1)); fields.put("price", createNumberField(100.1)); fields.put("enabled", createBooleanField(true)); fields.put("branch", createDateField(createOldTimestamp())); fields.put("categories", createNodeListField(UUID_4, UUID_5, UUID_6)); fields.put("names", createStringListField("Jack", "Joe", "Mary", "Tom")); fields.put("categoryIds", createNumberListField(1, 42, 133, 7)); fields.put("binary", createBinaryField()); fields.put("location", createMicronodeField("geolocation", Tuple.tuple("latitude", createNumberField(48.208330230278)), Tuple.tuple( "longitude", createNumberField(16.373063840833)))); fields.put("locations", createMicronodeListField(createMicronodeField("geolocation", Tuple.tuple("latitude", createNumberField( 48.208330230278)), Tuple.tuple("longitude", createNumberField(16.373063840833))), createMicronodeField("geolocation", Tuple.tuple( "latitude", createNumberField(48.137222)), Tuple.tuple("longitude", createNumberField(11.575556))))); nodeResponse.setFields(fields); nodeResponse.setSchema(getSchemaReference("content")); nodeResponse.setPermissions(READ, UPDATE, DELETE, CREATE); List<NodeReference> breadcrumb = new ArrayList<>(); breadcrumb.add(new NodeReference().setDisplayName("news").setPath("/news").setUuid(NODE_DELOREAN_UUID)); breadcrumb.add(new NodeReference().setDisplayName("2015").setPath("/automobiles/delorean-dmc-12").setUuid(NODE_AUTOMOBILES_CATEGEORY_UUID)); nodeResponse.setBreadcrumb(breadcrumb); List<TagReference> tags = new ArrayList<>(); tags.add(new TagReference().setName("red").setUuid(TAG_RED_UUID).setTagFamily("colors")); tags.add(new TagReference().setName("green").setUuid(TAG_GREEN_UUID).setTagFamily("colors")); tags.add(new TagReference().setName("car").setUuid(UUID_1)); tags.add(new TagReference().setName("ship").setUuid(UUID_2)); nodeResponse.setTags(tags); return nodeResponse; }  NodeResponse getNodeResponseWithAllFields(); static Field createBinaryField(); NavigationResponse getNavigationResponse(); NodeResponse getNodeResponse2(); NodeCreateRequest getNodeCreateRequest2(); NodeCreateRequest getNodeCreateRequest(); NodeUpdateRequest getNodeUpdateRequest2(); BinaryFieldTransformRequest getBinaryFieldTransformRequest(); NodeUpdateRequest getNodeUpdateRequest(); NodeListResponse getNodeListResponse(); Map<String, List<FormParameter>> getExampleBinaryUploadFormParameters(); NodeVersionsResponse createVersionsList();  }
@Test public void testNodeExample() { NodeResponse response = new NodeExamples().getNodeResponseWithAllFields(); assertNotNull(response.getUuid()); assertThat(response.getTags()).isNotEmpty(); assertThat(response.getBreadcrumb()).isNotEmpty(); assertNotNull(response.toJson()); }