{"id":93705,"date":"2019-07-03T10:00:23","date_gmt":"2019-07-03T07:00:23","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=93705"},"modified":"2019-06-28T11:02:31","modified_gmt":"2019-06-28T08:02:31","slug":"unit-testing-adf-application-using-junit","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html","title":{"rendered":"Unit testing of ADF Application using JUnit"},"content":{"rendered":"<p>JUnit is a unit testing package for Java language and can be used to test Oracle ADF application as ADF is built on top of the J2EE framework. Unit testing is basically is a process to verify the smallest testable module against some defined test criteria. Here I am going to illustrate that how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.<\/p>\n<p>JDeveloper&nbsp;12.2.1.3 comes with JUnit extension so no need to install it separately. Let\u2019s start by creating a Fusion Web Application in JDeveloper IDE. Here I am taking Departments table of default HR Schema to prepare the model for ADF Application.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"263\" height=\"312\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Fusion-Web-Application-1.jpg\" alt=\"ADF Application\" class=\"wp-image-93729\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Fusion-Web-Application-1.jpg 263w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Fusion-Web-Application-1-253x300.jpg 253w\" sizes=\"(max-width: 263px) 100vw, 263px\" \/><\/figure>\n<\/div>\n<p>Next step is to create a new project to hold unit tests so that whole application doesn\u2019t look ambiguous. Right click on the Application name and select&nbsp;<i>New\u2013&gt; From Gallery\u2013&gt; General\u2013&gt; Projects \u2013&gt; Java Project<\/i><i>&nbsp;<\/i><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"611\" height=\"511\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Create-a-Java-Project.jpg\" alt=\"ADF Application\" class=\"wp-image-93730\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Create-a-Java-Project.jpg 611w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Create-a-Java-Project-300x251.jpg 300w\" sizes=\"(max-width: 611px) 100vw, 611px\" \/><\/figure>\n<\/div>\n<p>Put a name for that project and click on <strong>Finish<\/strong> button.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"648\" height=\"496\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Project-Name.jpg\" alt=\"ADF Application\" class=\"wp-image-93731\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Project-Name.jpg 648w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Project-Name-300x230.jpg 300w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/figure>\n<\/div>\n<p>Now next step is to create Test Suite for business components and before that, we should know some terminology that is used in unit testing.<\/p>\n<p><strong>Test Suite<\/strong>\u2013 A group of Test Cases<\/p>\n<p><strong>Test Fixture<\/strong>\u2013 A class to handle long running test cases and keep the state of multiple test cases.<\/p>\n<p><strong>Assertation<\/strong>\u2013 To check the result of a test case against the expected result.<\/p>\n<p>Now to open test suite wizard, Right click on new project and select&nbsp;<i>New\u2013&gt; From Gallery\u2013&gt; General\u2013&gt; Unit Tests \u2013&gt; ADF Business Components Test Suite<\/i><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"669\" height=\"509\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Create-a-test-suite-in-Jdeveloper.jpg\" alt=\"ADF Application\" class=\"wp-image-93732\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Create-a-test-suite-in-Jdeveloper.jpg 669w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Create-a-test-suite-in-Jdeveloper-300x228.jpg 300w\" sizes=\"(max-width: 669px) 100vw, 669px\" \/><\/figure>\n<\/div>\n<p>Click on <strong>OK<\/strong> button and configure the test suite. You can see that here I have selected the <strong>Model<\/strong> project and <strong>DeptAm<\/strong> application module to test. You need to select Configuration for database connection too and here I have selected <strong>DeptAMLocal.<\/strong><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"645\" height=\"495\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Suite-Configuration.jpg\" alt=\"ADF Application\" class=\"wp-image-93733\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Suite-Configuration.jpg 645w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Suite-Configuration-300x230.jpg 300w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/figure>\n<\/div>\n<p>Click on the <strong>Next<\/strong> button and see that this wizard will generate a Test Suite class and a Test Fixture class. This wizard will also generate separate unit test classes for each view object in the application.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"654\" height=\"495\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Suite-Classes.jpg\" alt=\"ADF Application\" class=\"wp-image-93734\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Suite-Classes.jpg 654w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Suite-Classes-300x227.jpg 300w\" sizes=\"(max-width: 654px) 100vw, 654px\" \/><\/figure>\n<\/div>\n<p>Now click on <strong>Finish<\/strong> button and you can under new project all files are created.<\/p>\n<p><strong>DeptAmFixture.java<\/strong>\u2013 Test Fixture Class<\/p>\n<p><strong>AllDeptAMTests.java<\/strong>\u2013 Test Suite Class<\/p>\n<p><strong>DepartmentsVO1VOTest.java<\/strong>\u2013 Unit Test Class for Departments ViewObject<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"305\" height=\"272\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Files-Created.jpg\" alt=\"ADF Application\" class=\"wp-image-93735\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Files-Created.jpg 305w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Test-Files-Created-300x268.jpg 300w\" sizes=\"(max-width: 305px) 100vw, 305px\" \/><\/figure>\n<\/div>\n<p>Now open <strong>DepartmentsVO1VOTest.java&nbsp;<\/strong>class and look at the default test case that checks that the Department View Object should not be null.<\/p>\n<p>You can see here <em>@Test<\/em> annotation, this indicates that this java method is a unit test and after performing test&nbsp;<em>assert<\/em> is used to verify the test result.<\/p>\n<pre class=\"wp-block-preformatted brush:java\">@Test\npublic void testAccess() {\n    ViewObject view = fixture1.getApplicationModule().findViewObject(\"DepartmentsVO1\");\n    assertNotNull(view);\n}\n\n@Before\npublic void setUp() {\n}\n\n@After\npublic void tearDown() {\n}<\/pre>\n<p>To check this default test case, Right click on test suite class and select run. You can see that unit test execute successfully.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"502\" height=\"235\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/JUnit-Test-Runner.jpg\" alt=\"ADF Application\" class=\"wp-image-93736\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/JUnit-Test-Runner.jpg 502w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/JUnit-Test-Runner-300x140.jpg 300w\" sizes=\"(max-width: 502px) 100vw, 502px\" \/><\/figure>\n<\/div>\n<p>Next step is to create some of the own unit tests, I have created this unit test that checks that the Department Id should not null in a newly created row.<\/p>\n<pre class=\"wp-block-preformatted brush:java\">@Test\npublic void checkDeptIdNotNull() {\n    ViewObject deptVo = fixture1.getApplicationModule().findViewObject(\"DepartmentsVO1\");\n    Row newRow = deptVo.createRow();\n\n    newRow.setAttribute(\"DepartmentId\", 222);\n    newRow.setAttribute(\"DepartmentName\", \"Testing\");\n\n    assertNotNull(\"DepartmentId should not be null\", newRow.getAttribute(\"DepartmentId\"));\n}<\/pre>\n<p>So in the above code, I have created a new row in Departments view object and set 222 in Department Id. Now run this test case.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"426\" height=\"231\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Run-Test-Case.jpg\" alt=\"ADF Application\" class=\"wp-image-93737\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Run-Test-Case.jpg 426w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Run-Test-Case-300x163.jpg 300w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/figure>\n<\/div>\n<p>You can see here that test is passed successfully because Department Id is not null, That\u2019s great. Now comment this line in the code<\/p>\n<p><strong>\/\/newRow.setAttribute(\u201cDepartmentId\u201d, 222);<\/strong><\/p>\n<p>and run test again<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-1024x144.jpg\" alt=\"ADF Application\" class=\"wp-image-93738\" width=\"768\" height=\"108\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-1024x144.jpg 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-300x42.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-768x108.jpg 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed.jpg 1152w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>See that test is failed with AssertionError as Department Id is null this time. This is how we can write our own unit tests to check.<\/p>\n<p>Here I am writing one more test case to check whether the department is in the database or not. I am passing 1990 as department id that is not in the database.<\/p>\n<pre class=\"wp-block-preformatted brush:java\">@Test\npublic void findDepartment() {\n    ViewObject deptVo = fixture1.getApplicationModule().findViewObject(\"DepartmentsVO1\");\n    int deptId = 1990;\n\n    Row row[] = deptVo.findByKey(new Key(new Object[] { deptId }), 1);\n    Integer count = row.length;\n    \/\/assertTrue fails when second parameter evaluates to \"false\"\n    assertTrue(\"Department Not Found\", count.compareTo(0) == 1);\n\n}<\/pre>\n<p>Let\u2019s see the result<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-Junit-Test-Runner-1024x173.jpg\" alt=\"ADF Application\" class=\"wp-image-93739\" width=\"768\" height=\"130\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-Junit-Test-Runner-1024x173.jpg 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-Junit-Test-Runner-300x51.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-Junit-Test-Runner-768x130.jpg 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/06\/Unit-Test-Failed-Junit-Test-Runner.jpg 1099w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>This is how we configure and use JUnit in Oracle ADF Application for Unit Testing.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Ashish Awasthi, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener noreferrer\">JCG program<\/a>. See the original article here: <a href=\"http:\/\/www.awasthiashish.com\/2019\/01\/unit-testing-of-adf-application-using-junit.html\" target=\"_blank\" rel=\"noopener noreferrer\">Unit testing of ADF Application using JUnit<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>JUnit is a unit testing package for Java language and can be used to test Oracle ADF application as ADF is built on top of the J2EE framework. Unit testing is basically is a process to verify the smallest testable module against some defined test criteria. Here I am going to illustrate that how can &hellip;<\/p>\n","protected":false},"author":85448,"featured_media":176,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[274,1774],"class_list":["post-93705","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-junit","tag-unit-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Unit testing of ADF Application using JUnit - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about ADF Application? Check our article explaining how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.\" \/>\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\/2019\/07\/unit-testing-adf-application-using-junit.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unit testing of ADF Application using JUnit - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about ADF Application? Check our article explaining how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.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:author\" content=\"https:\/\/facebook.com\/ashhish000\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-03T07:00:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.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=\"Ashish Awasthi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ashish__awasthi\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashish Awasthi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html\"},\"author\":{\"name\":\"Ashish Awasthi\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/3c4672dfc526880ea60560f7474f6434\"},\"headline\":\"Unit testing of ADF Application using JUnit\",\"datePublished\":\"2019-07-03T07:00:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html\"},\"wordCount\":652,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"keywords\":[\"JUnit\",\"Unit Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html\",\"name\":\"Unit testing of ADF Application using JUnit - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"datePublished\":\"2019-07-03T07:00:23+00:00\",\"description\":\"Interested to learn about ADF Application? Check our article explaining how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/07\\\/unit-testing-adf-application-using-junit.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\":\"Unit testing of ADF Application using JUnit\"}]},{\"@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\\\/3c4672dfc526880ea60560f7474f6434\",\"name\":\"Ashish Awasthi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f7d5962e721af4cb01df8f894447ad50c65cb662e5b4b21332f3c4210eb052c2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f7d5962e721af4cb01df8f894447ad50c65cb662e5b4b21332f3c4210eb052c2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f7d5962e721af4cb01df8f894447ad50c65cb662e5b4b21332f3c4210eb052c2?s=96&d=mm&r=g\",\"caption\":\"Ashish Awasthi\"},\"description\":\"An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF\",\"sameAs\":[\"http:\\\/\\\/www.awasthiashish.com\",\"https:\\\/\\\/facebook.com\\\/ashhish000\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ashishkumarawasthi\\\/\",\"https:\\\/\\\/x.com\\\/ashish__awasthi\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/ashish-awasthi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unit testing of ADF Application using JUnit - Java Code Geeks","description":"Interested to learn about ADF Application? Check our article explaining how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.","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\/2019\/07\/unit-testing-adf-application-using-junit.html","og_locale":"en_US","og_type":"article","og_title":"Unit testing of ADF Application using JUnit - Java Code Geeks","og_description":"Interested to learn about ADF Application? Check our article explaining how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.","og_url":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/facebook.com\/ashhish000","article_published_time":"2019-07-03T07:00:23+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","type":"image\/jpeg"}],"author":"Ashish Awasthi","twitter_card":"summary_large_image","twitter_creator":"@ashish__awasthi","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ashish Awasthi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html"},"author":{"name":"Ashish Awasthi","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/3c4672dfc526880ea60560f7474f6434"},"headline":"Unit testing of ADF Application using JUnit","datePublished":"2019-07-03T07:00:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html"},"wordCount":652,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","keywords":["JUnit","Unit Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html","url":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html","name":"Unit testing of ADF Application using JUnit - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","datePublished":"2019-07-03T07:00:23+00:00","description":"Interested to learn about ADF Application? Check our article explaining how can we set up and use JUnit in JDeveloper 12.2.1.3 to test ADF application.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2019\/07\/unit-testing-adf-application-using-junit.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":"Unit testing of ADF Application using JUnit"}]},{"@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\/3c4672dfc526880ea60560f7474f6434","name":"Ashish Awasthi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f7d5962e721af4cb01df8f894447ad50c65cb662e5b4b21332f3c4210eb052c2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f7d5962e721af4cb01df8f894447ad50c65cb662e5b4b21332f3c4210eb052c2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f7d5962e721af4cb01df8f894447ad50c65cb662e5b4b21332f3c4210eb052c2?s=96&d=mm&r=g","caption":"Ashish Awasthi"},"description":"An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF","sameAs":["http:\/\/www.awasthiashish.com","https:\/\/facebook.com\/ashhish000","https:\/\/www.linkedin.com\/in\/ashishkumarawasthi\/","https:\/\/x.com\/ashish__awasthi"],"url":"https:\/\/www.javacodegeeks.com\/author\/ashish-awasthi"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/93705","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\/85448"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=93705"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/93705\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/176"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=93705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=93705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=93705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}