{"id":17897,"date":"2015-03-22T18:36:27","date_gmt":"2015-03-22T13:06:27","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=17897"},"modified":"2015-10-16T15:32:07","modified_gmt":"2015-10-16T10:02:07","slug":"unit-test-a-method-returning-an-object-of-protected-class","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/","title":{"rendered":"Unit test a method returning an object of protected class"},"content":{"rendered":"<p>Following is an example of testing a method which returns an object of protect class:<\/p>\n<p>In the <a title=\"Fetching list of message codes from message.properties file\" href=\"https:\/\/tothenewco.pro\/blog\/fetching-list-of-message-codes-from-message-properties-file\">previous blog<\/a> we talked about fetching the list of message codes from message.properties file.<\/p>\n<p>While writing the test case for <strong>CustomisedPluginAwareResourceBundleMessageSource<\/strong>, I was not able to test the message properties that are available when your application is actually running. Functionality rendered by getMergedProperties() method of ReloadableResourceBundleMessageSource.java is not available while writing test cases.<\/p>\n<p>Signature for getMergedProperties() is<\/p>\n<p>[java]<br \/>\nprotected PropertiesHolder getMergedProperties(final Locale locale){}<br \/>\n[\/java]<\/p>\n<p>Also the class <strong>PropertiesHolder<\/strong> is protected so we cant access it in our test files.<\/p>\n<p>Here is a proposed solution for testing listMessageCodes(). Create a class like <strong>CustomProperties<\/strong> which is similar to <strong>PropertiesHolder<\/strong> in behaviour:<\/p>\n<p>[java]<br \/>\nclass CustomProperties {<br \/>\n    Properties properties<br \/>\n}<br \/>\n[\/java]<\/p>\n<p>Mock getMergedProperties():<\/p>\n<p>[java]<br \/>\nmessageSource.metaClass.getMergedProperties = { final Locale tempLocale -&gt;<br \/>\n            Properties properties = new Properties()<br \/>\n            properties.setProperty(&#8216;square.black.label&#8217;, &#8216;Black Square&#8217;)<br \/>\n            properties.setProperty(&#8216;circle.violet.label&#8217;, &#8216;Violet Circle&#8217;)<br \/>\n            properties.setProperty(&#8216;fruit.black.label&#8217;, &#8216;Black Grape&#8217;)<\/p>\n<p>            CustomProperties customProperties = new CustomProperties()<br \/>\n            customProperties.properties = properties<br \/>\n            return customProperties<br \/>\n        }<\/p>\n<p>\/\/messageSource referred here is<br \/>\n\/\/   CustomisedPluginAwareResourceBundleMessageSource messageSource<br \/>\n[\/java]<\/p>\n<p>Finally, our test case will look like<\/p>\n<p>[java]<br \/>\nvoid &quot;test listMessageCodes&quot;() {<br \/>\n        setup:<br \/>\n        Locale locale = new Locale(&#8216;en&#8217;, &#8216;US&#8217;)<br \/>\n        String lookupMessageCode = &#8216;black&#8217;<br \/>\n        messageSource.metaClass.getMergedProperties = { final Locale tempLocale -&gt;<br \/>\n            Properties properties = new Properties()<br \/>\n            properties.setProperty(&#8216;square.black.label&#8217;, &#8216;Black Square&#8217;)<br \/>\n            properties.setProperty(&#8216;circle.violet.label&#8217;, &#8216;Violet Circle&#8217;)<br \/>\n            properties.setProperty(&#8216;fruit.black.label&#8217;, &#8216;Black Grape&#8217;)<\/p>\n<p>            CustomProperties customProperties = new CustomProperties()<br \/>\n            customProperties.properties = properties<br \/>\n            return customProperties<br \/>\n        }<\/p>\n<p>        when:<br \/>\n        List list = messageSource.listMessageCodes(locale, lookupMessageCode)<\/p>\n<p>        then:<br \/>\n        list.get(0).toString().contains(&#8216;black&#8217;)<br \/>\n    }<br \/>\n[\/java]<\/p>\n<p>Don&#8217;t forget to add <strong>@ConfineMetaClassChanges<\/strong> to the spec. It restores the meta classes to its previous state.<\/p>\n<p>That&#8217;s it&#8230;<\/p>\n<p>Search for a demo <a title=\"demo\" href=\"https:\/\/github.com\/neha-gupta11\/filtering-i18N-message-codes-properties\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":4,"footnotes":""},"categories":[1],"tags":[4840,492,1677,1678,319,1159],"class_list":["post-17897","post","type-post","status-publish","format-standard","hentry","category-technology","tag-grails","tag-i18n","tag-spock-testing-grails","tag-testing-propertiesholder","tag-unit-test-for-beginners-in-grails","tag-unit-testing"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Neha Gupta\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Unit test a method returning an object of protected class | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Unit test a method returning an object of protected class | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#article\",\"name\":\"Unit test a method returning an object of protected class | TO THE NEW Blog\",\"headline\":\"Unit test a method returning an object of protected class\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/neha\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2015-03-22T18:36:27+05:30\",\"dateModified\":\"2015-10-16T15:32:07+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#webpage\"},\"articleSection\":\"Technology, Grails, i18n, spock testing grails, testing PropertiesHolder, unit test for beginners in grails, unit testing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#listItem\",\"name\":\"Unit test a method returning an object of protected class\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#listItem\",\"position\":3,\"name\":\"Unit test a method returning an object of protected class\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/neha\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/neha\\\/\",\"name\":\"Neha Gupta\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a14fd5f9979fd5d8e3de87e89b59b2b233ac8e0851b1f5bd242c19c508895c65?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Neha Gupta\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/\",\"name\":\"Unit test a method returning an object of protected class | TO THE NEW Blog\",\"description\":\"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/unit-test-a-method-returning-an-object-of-protected-class\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/neha\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/neha\\\/#author\"},\"datePublished\":\"2015-03-22T18:36:27+05:30\",\"dateModified\":\"2015-10-16T15:32:07+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Unit test a method returning an object of protected class | TO THE NEW Blog","description":"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually","canonical_url":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#article","name":"Unit test a method returning an object of protected class | TO THE NEW Blog","headline":"Unit test a method returning an object of protected class","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/neha\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"datePublished":"2015-03-22T18:36:27+05:30","dateModified":"2015-10-16T15:32:07+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#webpage"},"articleSection":"Technology, Grails, i18n, spock testing grails, testing PropertiesHolder, unit test for beginners in grails, unit testing"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#listItem","name":"Unit test a method returning an object of protected class"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#listItem","position":3,"name":"Unit test a method returning an object of protected class","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/neha\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/neha\/","name":"Neha Gupta","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a14fd5f9979fd5d8e3de87e89b59b2b233ac8e0851b1f5bd242c19c508895c65?s=96&d=mm&r=g","width":96,"height":96,"caption":"Neha Gupta"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/","name":"Unit test a method returning an object of protected class | TO THE NEW Blog","description":"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/neha\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/neha\/#author"},"datePublished":"2015-03-22T18:36:27+05:30","dateModified":"2015-10-16T15:32:07+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Unit test a method returning an object of protected class | TO THE NEW Blog","og:description":"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually","og:url":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Unit test a method returning an object of protected class | TO THE NEW Blog","twitter:description":"Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"17897","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 18:08:05","updated":"2024-02-29 09:29:24","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUnit test a method returning an object of protected class\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"Unit test a method returning an object of protected class","link":"https:\/\/tothenewco.pro\/blog\/unit-test-a-method-returning-an-object-of-protected-class\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/17897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=17897"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/17897\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=17897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=17897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=17897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}