{"id":1415,"date":"2012-06-10T15:00:00","date_gmt":"2012-06-10T15:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/testing-abstract-classes-and-template-method-pattern.html"},"modified":"2012-10-22T05:40:18","modified_gmt":"2012-10-22T05:40:18","slug":"testing-abstract-classes-and-template","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html","title":{"rendered":"Testing Abstract Classes and Template Method Pattern"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">From wikipedia &#8220;A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors while ensuring that the overarching algorithm is still followed&#8221;. <\/p>\n<p>Typically this pattern is composed by two or more classes, one that is an abstract class providing template methods (non-abstract) that have calls to abstract methods implemented by one or more concrete subclasses. <\/p>\n<p>Often template abstract class and concrete implementations reside in the same project, but depending on the scope of the project, these concrete objects will be implemented into another project. <\/p>\n<p>In this post we are going to see how to test template method pattern when concrete classes are implemented on external project, or more general how to test abstract classes. <\/p>\n<p>Let&#8217;s see a simple example of template method pattern. Consider a class which is responsible of receiving a vector of integers and calculate the Euclidean norm. These integers could be received from multiple sources, and is left to each project to provide a way to obtain them. <\/p>\n<p>The template class looks like: <\/p>\n<pre class=\"brush:java\">public abstract class AbstractCalculator {\r\n\r\n public double euclideanNorm() {\r\n\r\n  int[] vector = this.read();\r\n\r\n  int total = 0;\r\n\r\n  for(int element:vector) {\r\n   total+= (element*element);  \r\n  }\r\n\r\n  return Math.sqrt(total);\r\n }\r\n\r\n public abstract int[] read();\r\n}\r\n<\/pre>\n<p>Now another project could extend previous class and make an implementation of  abstract calculator by providing an implementation of read() method . <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">public class ConsoleCalculator extends AbstractCalculator {\r\n\r\n public int[] read() {\r\n\r\n  int [] data = new int[0];\r\n\r\n  Scanner scanner = new Scanner(System.in);\r\n\r\n  \/\/data = read requried data from console\r\n\r\n  return data; \r\n\r\n }\r\n\r\n}\r\n<\/pre>\n<p>Developer that has written a concrete implementation will test only read() method, he can &#8220;trust&#8221; that developer of abstract class has tested non-abstract methods. <\/p>\n<p>But how are we going to write unit tests over calculate method if class is abstract and an implementation of read() method is required? <\/p>\n<p>The first approach could be creating a fake implementation:  <\/p>\n<pre class=\"brush:java\">public class FakeCalculator extends AbstractCalculator {\r\n\r\n private int[] data;\r\n\r\n public FakeCalculator(int[] data) {\r\n  this.data = data;\r\n }\r\n\r\n public int[] read() {\r\n  return this.data;\r\n }\r\n\r\n}\r\n<\/pre>\n<p>This is not a bad approach, but has some disadvantages: <\/p>\n<ul>\n<li>Test will be less readable, readers should know the existence of these fake classes and must know exactly what are they doing. <\/li>\n<li>As a test writer you will spend time in implementing fake classes, in this case it is simple, but your project could have more than one abstract class without implementation, or even with more than one abstract method.<\/li>\n<li>Behaviour of fake classes are &#8220;hard-coded&#8221;.<\/li>\n<\/ul>\n<p>A better way is using Mockito to mock only abstract method meanwhile implementation of non-abstract methods are called. <\/p>\n<pre class=\"brush:java\">public class WhenCalculatingEuclideanNorm {\r\n\r\n @Test\r\n public void should_calculate_correctly() {\r\n\r\n  AbstractCalculator abstractCalculator = mock(AbstractCalculator.class, Mockito.CALLS_REAL_METHODS);\r\n\r\n  doReturn(new int[]{2,2}).when(abstractCalculator).read();\r\n  assertThat(abstractCalculator.euclideanNorm(), is(2.8284271247461903));\r\n\r\n }\r\n\r\n @Test\r\n public void should_calculate_correctly_with_negative_values() {\r\n\r\n  AbstractCalculator abstractCalculator = mock(AbstractCalculator.class, Mockito.CALLS_REAL_METHODS);\r\n\r\n  doReturn(new int[]{-2,-2}).when(abstractCalculator).read();\r\n  assertThat(abstractCalculator.euclideanNorm(), is(2.8284271247461903));\r\n\r\n }\r\n\r\n}\r\n<\/pre>\n<p>Mockito simplifies the testing of abstract classes by calling real methods, and only stubbing abstract methods. See that in this case because we are calling real methods by default, instead of using the typical when() then() structure, doReturn schema must be used. <\/p>\n<p>Of course this approach can be only used if your project does not contain a concrete implementation of algorithm or your project will be a part of a 3rd party library on another project. In the other cases the best way of attacking the problem is by testing the implemented class. <\/p>\n<p><a href=\"https:\/\/github.com\/downloads\/maggandalf\/Blog-Examples\/templatemethod.zip\">Download sourcecode<\/a><\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.lordofthejars.com\/2012\/06\/testing-abstract-classes-and-template.html\">Testing Abstract Classes (and Template Method Pattern in Particular)<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Alex Soto at the <a href=\"http:\/\/www.lordofthejars.com\/\">One Jar To Rule Them All<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>From wikipedia &#8220;A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors while ensuring that the overarching algorithm is still followed&#8221;. Typically this pattern is composed by two or more classes, one that is an abstract class providing template &hellip;<\/p>\n","protected":false},"author":119,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[145,273],"class_list":["post-1415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-design-patterns","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Testing Abstract Classes and Template Method Pattern - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"From wikipedia &quot;A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing Abstract Classes and Template Method Pattern - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"From wikipedia &quot;A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-06-10T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T05:40:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alex Soto\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/alexsotob\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex Soto\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html\"},\"author\":{\"name\":\"Alex Soto\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/6566a1238c71f5d85ba5b5df5d2eac59\"},\"headline\":\"Testing Abstract Classes and Template Method Pattern\",\"datePublished\":\"2012-06-10T15:00:00+00:00\",\"dateModified\":\"2012-10-22T05:40:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html\"},\"wordCount\":481,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Design Patterns\",\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html\",\"name\":\"Testing Abstract Classes and Template Method Pattern - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2012-06-10T15:00:00+00:00\",\"dateModified\":\"2012-10-22T05:40:18+00:00\",\"description\":\"From wikipedia \\\"A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/testing-abstract-classes-and-template.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Testing Abstract Classes and Template Method Pattern\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/6566a1238c71f5d85ba5b5df5d2eac59\",\"name\":\"Alex Soto\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g\",\"caption\":\"Alex Soto\"},\"sameAs\":[\"http:\\\/\\\/www.lordofthejars.com\\\/\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/alexsotob\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Alex-Soto\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Testing Abstract Classes and Template Method Pattern - Java Code Geeks","description":"From wikipedia \"A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html","og_locale":"en_US","og_type":"article","og_title":"Testing Abstract Classes and Template Method Pattern - Java Code Geeks","og_description":"From wikipedia \"A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to","og_url":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-06-10T15:00:00+00:00","article_modified_time":"2012-10-22T05:40:18+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Alex Soto","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/alexsotob","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Alex Soto","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html"},"author":{"name":"Alex Soto","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/6566a1238c71f5d85ba5b5df5d2eac59"},"headline":"Testing Abstract Classes and Template Method Pattern","datePublished":"2012-06-10T15:00:00+00:00","dateModified":"2012-10-22T05:40:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html"},"wordCount":481,"commentCount":3,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Design Patterns","Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html","url":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html","name":"Testing Abstract Classes and Template Method Pattern - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2012-06-10T15:00:00+00:00","dateModified":"2012-10-22T05:40:18+00:00","description":"From wikipedia \"A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/testing-abstract-classes-and-template.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Testing Abstract Classes and Template Method Pattern"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/6566a1238c71f5d85ba5b5df5d2eac59","name":"Alex Soto","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g","caption":"Alex Soto"},"sameAs":["http:\/\/www.lordofthejars.com\/","https:\/\/x.com\/http:\/\/twitter.com\/alexsotob"],"url":"https:\/\/www.javacodegeeks.com\/author\/Alex-Soto"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/119"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1415"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1415\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}