{"id":43498,"date":"2017-02-10T11:00:43","date_gmt":"2017-02-10T09:00:43","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=43498"},"modified":"2019-03-21T11:09:35","modified_gmt":"2019-03-21T09:09:35","slug":"junit-fixmethodorder-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/","title":{"rendered":"JUnit FixMethodOrder Example"},"content":{"rendered":"<p>With this example, we are going to demonstrate users when, how and why JUnit <code>FixMethodOrder<\/code> annotation is used. In previous example <a href=\"http:\/\/examples.javacodegeeks.com\/core-java\/junit\/junit-hello-world-example\/\" target=\"_blank\" rel=\"noopener noreferrer\">JUnit Hello World<\/a>, users have seen how they can start using JUnit. Users are advised to see the setup of project in <a href=\"http:\/\/examples.javacodegeeks.com\/core-java\/junit\/junit-hello-world-example\/\" target=\"_blank\" rel=\"noopener noreferrer\">JUnit Hello World<\/a> example, if they want to continue with Maven.<\/p>\n<p>This example is useful in cases where user wants to run their test cases in particular order. Users are required to have basic knowledge of Java for this example. We will follow with an short example to show the process of using JUnit <code>FixMethodOrder<\/code> annotation.<br \/>\n&nbsp;<\/p>\n<div class=\"tip\"><strong>Tip<\/strong><br \/>\nYou may skip introduction and jump directly to the <a href=\"#code\"><strong>beginning of the example<\/strong><\/a> below.<\/div>\n<\/p>\n<h2>1. Tools Used<\/h2>\n<p>For this example you will need:<\/p>\n<ul>\n<li>Java 8<\/li>\n<li>JUnit 4.12<\/li>\n<\/ul>\n<h2>2. Introduction<\/h2>\n<p>JUnit <code>@FixMethodOrder<\/code> annotation is used with JUnit for specifying order of the methods to run. JUnit is a testing framework for Java. Users who are not aware of the JUnit, can refer to the post <a href=\"http:\/\/examples.javacodegeeks.com\/core-java\/junit\/junit-hello-world-example\/\" target=\"_blank\" rel=\"noopener noreferrer\">JUnit Hello World<\/a>.<\/p>\n<p>By default there is no specific order of execution and the test cases run without any predictability. <code>@FixMethodOrder<\/code> is useful in instances, where users need to run their test cases in order of the names of the test cases.&nbsp;<code>@FixMethodOrder<\/code> annotation helps to achieve this goal.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2>3. JUnit FixMethodOrder Annotation<\/h2>\n<p>Furthermore this annotation makes use of <code>MethodSorters<\/code> Enum as parameter name to identify the order. In order to start with <code>@FixMethodOrder<\/code> annotation, let&#8217;s do a quick look into the <code>MethodSorters<\/code> Enum.<\/p>\n<h3>3.1 MethodSorters Enum<\/h3>\n<p><code>MethodSorters<\/code> Enum contains 3 types of constants.<\/p>\n<ul>\n<li><strong>DEFAULT<\/strong>: Default implementation and the order is not predictable.<\/li>\n<li><strong>JVM<\/strong>: This constant leaves the execution of order on JVM.<\/li>\n<li><strong>NAME_ASCENDING<\/strong>: This is mostly used constant that sorts the method name in ascending order.<\/li>\n<\/ul>\n<p><code>MethodSorters.NAME_ASCENDING<\/code> is the most noteworthy, and especially relevant for users. It uses <code>Method.toString()<\/code> method, in case there is a tie breaker (i.e. method with same name) between the method names.<\/p>\n<p><span id=\"code\"><\/span><br \/>\nLet&#8217;s start with an example.<\/p>\n<h2>4. Example<\/h2>\n<p>First of all let&#8217;s create a class without the <code>@FixMethodOrder<\/code> annotation. This is a &nbsp;simple class with 3 test cases:<\/p>\n<ul>\n<li>firstTest()<\/li>\n<li>secondTest()<\/li>\n<li>thirdTest()<\/li>\n<\/ul>\n<p>These are simple test cases which prints out the name of the test case. The output result is also shown after class.[ulp id=&#8217;ODQaBEw1BIbHApZq&#8217;]<\/p>\n<p><span style=\"text-decoration: underline;\"><em>JUnitFixMethodOrderTest<\/em><\/span><\/p>\n<pre class=\"brush:java\">package junit;\n\nimport org.junit.Test;\n\npublic class JUnitFixMethodOrderTest {\n\n\t@Test\n\tpublic void firstTest() {\n\t\tSystem.out.println(\"First Test\");\n\t}\n\t\n\t@Test\n\tpublic void thirdTest() {\n\t\tSystem.out.println(\"Third Test\");\n\t}\n\t\n\t@Test\n\tpublic void secondTest() {\n\t\tSystem.out.println(\"Second Test\");\n\t}\n}\n<\/pre>\n<p>The output result is shown below:<\/p>\n<pre class=\"brush:bash\">Third Test\nFirst Test\nSecond Test\n<\/pre>\n<p>Users can see, that the order of execution is not predictable at all, rather test cases run randomly. Now make changes to the class to include the <code>@FixMethodOrder<\/code> annotation.<br \/>\nSee the changes below, especially the highlighted lines.<\/p>\n<pre class=\"brush:java; highlight:[3,5,7]\">package junit;\n\nimport org.junit.FixMethodOrder;\nimport org.junit.Test;\nimport org.junit.runners.MethodSorters;\n\n@FixMethodOrder(MethodSorters.NAME_ASCENDING)\npublic class JUnitFixMethodOrderTest {\n\n\t@Test\n\tpublic void firstTest() {\n\t\tSystem.out.println(\"First Test\");\n\t}\n\t\n\t@Test\n\tpublic void thirdTest() {\n\t\tSystem.out.println(\"Third Test\");\n\t}\n\t\n\t@Test\n\tpublic void secondTest() {\n\t\tSystem.out.println(\"Second Test\");\n\t}\n}\n<\/pre>\n<p>The output result is shown below:<\/p>\n<pre class=\"brush:bash\">First Test\nSecond Test\nThird Test\n<\/pre>\n<p>Hence from the above output, it is clear that the JUnit <code>@FixMethodOrder<\/code> annotation helps test cases run according to the names of methods.<\/p>\n<h2>5. Conclusion<\/h2>\n<p>In this example, users have learnt about the use of the JUnit <code>@FixMethodOrder<\/code> annotation. Users get an insight into how, why and when they should use <code>@FixMethodOrder<\/code> annotation.<\/p>\n<h2>6. Download&nbsp;The Source Code<\/h2>\n<p>This was an example of JUnit <code>@FixMethodOrder<\/code> annotation.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the java file of this example here:&nbsp;<a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2017\/02\/JUnitFixMethodOrderTest.zip\"><strong>JUnitFixMethodOrderTest.zip<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>With this example, we are going to demonstrate users when, how and why JUnit FixMethodOrder annotation is used. In previous example JUnit Hello World, users have seen how they can start using JUnit. Users are advised to see the setup of project in JUnit Hello World example, if they want to continue with Maven. This &hellip;<\/p>\n","protected":false},"author":112,"featured_media":6678,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[189,1032],"class_list":["post-43498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-junit","tag-core-java-2","tag-junit"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JUnit FixMethodOrder Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"In this example we shall show you the use of JUnit FixMethodOrder Annotation. This is very useful in instances where we need to run test cases in order.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JUnit FixMethodOrder Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"In this example we shall show you the use of JUnit FixMethodOrder Annotation. This is very useful in instances where we need to run test cases in order.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-10T09:00:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-21T09:09:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-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=\"Vinod Kumar Kashyap\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vinodkashyap\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vinod Kumar Kashyap\" \/>\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:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\"},\"author\":{\"name\":\"Vinod Kumar Kashyap\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c\"},\"headline\":\"JUnit FixMethodOrder Example\",\"datePublished\":\"2017-02-10T09:00:43+00:00\",\"dateModified\":\"2019-03-21T09:09:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\"},\"wordCount\":491,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"keywords\":[\"core java\",\"junit\"],\"articleSection\":[\"junit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\",\"name\":\"JUnit FixMethodOrder Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"datePublished\":\"2017-02-10T09:00:43+00:00\",\"dateModified\":\"2019-03-21T09:09:35+00:00\",\"description\":\"In this example we shall show you the use of JUnit FixMethodOrder Annotation. This is very useful in instances where we need to run test cases in order.\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"junit\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/junit\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"JUnit FixMethodOrder Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c\",\"name\":\"Vinod Kumar Kashyap\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g\",\"caption\":\"Vinod Kumar Kashyap\"},\"description\":\"Vinod is Sun Certified and love to work in Java and related technologies. Having more than 13 years of experience, he had developed software's including technologies like Java, Hibernate, Struts, Spring, HTML 5, jQuery, CSS, Web Services, MongoDB, AngularJS, AWS. He is also a JUG Leader of Chandigarh Java User Group.\",\"sameAs\":[\"http:\/\/www.vinodkashyap.com\/\",\"https:\/\/www.instagram.com\/vinodkashyap\/\",\"https:\/\/in.linkedin.com\/in\/vinodkashyap\",\"https:\/\/in.pinterest.com\/vinodkashyap\/\",\"https:\/\/x.com\/vinodkashyap\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/vinod-kashyap\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JUnit FixMethodOrder Example - Java Code Geeks","description":"In this example we shall show you the use of JUnit FixMethodOrder Annotation. This is very useful in instances where we need to run test cases in order.","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:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/","og_locale":"en_US","og_type":"article","og_title":"JUnit FixMethodOrder Example - Java Code Geeks","og_description":"In this example we shall show you the use of JUnit FixMethodOrder Annotation. This is very useful in instances where we need to run test cases in order.","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-02-10T09:00:43+00:00","article_modified_time":"2019-03-21T09:09:35+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","type":"image\/jpeg"}],"author":"Vinod Kumar Kashyap","twitter_card":"summary_large_image","twitter_creator":"@vinodkashyap","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Vinod Kumar Kashyap","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/"},"author":{"name":"Vinod Kumar Kashyap","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c"},"headline":"JUnit FixMethodOrder Example","datePublished":"2017-02-10T09:00:43+00:00","dateModified":"2019-03-21T09:09:35+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/"},"wordCount":491,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","keywords":["core java","junit"],"articleSection":["junit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/","name":"JUnit FixMethodOrder Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","datePublished":"2017-02-10T09:00:43+00:00","dateModified":"2019-03-21T09:09:35+00:00","description":"In this example we shall show you the use of JUnit FixMethodOrder Annotation. This is very useful in instances where we need to run test cases in order.","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/11\/junit-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/junit\/junit-fixmethodorder-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"junit","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/junit\/"},{"@type":"ListItem","position":5,"name":"JUnit FixMethodOrder Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/1d6281e8235e49b5b8614621c2445d2c","name":"Vinod Kumar Kashyap","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a11634ec460c849e8631b740af1b75cb68c9c58d5c2339c21bcd95f55b9af4f5?s=96&d=mm&r=g","caption":"Vinod Kumar Kashyap"},"description":"Vinod is Sun Certified and love to work in Java and related technologies. Having more than 13 years of experience, he had developed software's including technologies like Java, Hibernate, Struts, Spring, HTML 5, jQuery, CSS, Web Services, MongoDB, AngularJS, AWS. He is also a JUG Leader of Chandigarh Java User Group.","sameAs":["http:\/\/www.vinodkashyap.com\/","https:\/\/www.instagram.com\/vinodkashyap\/","https:\/\/in.linkedin.com\/in\/vinodkashyap","https:\/\/in.pinterest.com\/vinodkashyap\/","https:\/\/x.com\/vinodkashyap"],"url":"https:\/\/examples.javacodegeeks.com\/author\/vinod-kashyap\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/43498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=43498"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/43498\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/6678"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=43498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=43498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=43498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}