{"id":1610,"date":"2012-08-30T10:00:00","date_gmt":"2012-08-30T10:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/tips-for-testing-with-java.html"},"modified":"2012-10-22T06:17:02","modified_gmt":"2012-10-22T06:17:02","slug":"tips-for-testing-with-java","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html","title":{"rendered":"Tips for testing with Java"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\"><strong>Introduction<\/strong><\/p>\n<p>I love automated testing. In a rare diversion into op-ed<a href=\"http:\/\/en.wikipedia.org\/wiki\/Op-ed\"><sup>1<\/sup><\/a> I thought a put few thoughts (read &#8211; opinions) together.              <\/p>\n<p>Before I start on how best to compose your tests, I briefly ask &#8211; What are the reasons for testing? Broadly, I think they are:              <\/p>\n<ol>\n<li> Reduce total number of bugs \/ increase product stability <\/li>\n<li> Ensure software works as per specification <\/li>\n<li> Achieve the above at low cost, low impact.<\/li>\n<\/ol>\n<p>I think this boils down to providing software that does what your customer wants (features), doesn&#8217;t do what they don&#8217;t want (bugs), and do it without making too much noise (cost).<\/p>\n<p><strong>Choosing your system<\/strong><\/p>\n<p>Choose a system that has a low barrier to entry, something people are keen to learn, or will already know:              <\/p>\n<ol>\n<li>One where there&#8217;s value in learning, such as a popular industry standard, and those systems will be better documented, better understood, more reliable, and your colleagues will be easier to get on board.<\/li>\n<li>Use the system &#8220;in-paradigm&#8221;, by which I mean, use it as was meant to be used, not in an unusual &#8220;out-of-paradigm&#8221; way, this will make your colleagues life difficult, and prevent adoption.<\/li>\n<\/ol>\n<p>Can you can test multiple configurations, where some tests are only applicable to some modules and configurations?              <\/p>\n<p>Is it robust?              <\/p>\n<ol>\n<li>Will changes to test subjects lead easily to identifying the tests that need changing? A change to your underlying implementation shouldn&#8217;t silently break the tests.<\/li>\n<li>Avoid completely dynamic languages, compile time checking prevents typographical errors and identifies tests that might need changing if the test subject changes.<\/li>\n<\/ol>\n<p>Consider if the system is usable by both developers, and to less technical people &#8211; will you want testers or QA to be able to write tests?              <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Once upon a time I thought this was a no brainer: is the test system fully automated? Or, is it going to cost your company money each time you run them?<\/p>\n<p><strong>Writing Tests<\/strong>              <\/p>\n<p>Tests should be fast to run and fast to write:              <\/p>\n<ol>\n<li>Writing tests should not require time-consuming set-up of databases, DLLs or environments, automate anything of this nature.<\/li>\n<li>You should not require tacit knowledge of customised systems, no ones want to indulge in tedious manual set up. It&#8217;s just cost.<\/li>\n<li>Ask yourself &#8211; is running someone else&#8217;s tests should be possible with a single button?<\/li>\n<li>The tests themselves should not take long to write.<\/li>\n<\/ol>\n<p>Don&#8217;t confuse tests for production code:              <\/p>\n<ol>\n<li>Don&#8217;t worry too much about writing the most &#8220;effective Java&#8221; test code, or reuse. Fields don&#8217;t need to be &#8220;private final&#8221;.<\/li>\n<li>You don&#8217;t need to enforce you coding standards on tests.<\/li>\n<\/ol>\n<p>Test the behaviour, not the method (@Test void testMethodX anyone?):              <\/p>\n<ol>\n<li>Consider a BDD based system.<\/li>\n<\/ol>\n<p>Consider writing test for interfaces, and then using a<a href=\"https:\/\/blogs.oracle.com\/jacobc\/entry\/parameterized_unit_tests_with_junit\"> <\/a><a href=\"https:\/\/blogs.oracle.com\/jacobc\/entry\/parameterized_unit_tests_with_junit\">parameterized<\/a> runner that will run the same set of tests for each implementation.              <\/p>\n<p>Test failure should clearly feedback into fixes:              <\/p>\n<ol>\n<li>Capture output from tests so failure can be diagnosed.<\/li>\n<li>Make sure failed tests can be run in isolation from their suite, so you can focus on fixing failing tests.<\/li>\n<li>How long is the mean time between test failure, fixing the faulty code and rerun of the test?<\/li>\n<\/ol>\n<p><strong>Test Support and Test Doubles<\/strong>             <\/p>\n<p>Document supporting code:              <\/p>\n<ol>\n<li>Test doubles or fixtures won&#8217;t be reused if people don&#8217;t know about them or how.<\/li>\n<\/ol>\n<p>With JUnit, consider using <a href=\"http:\/\/www.alexecollins.com\/?q=content\/tutorial-junit-rule\">@Rules<\/a> to provide mixin-esq components for tests.              <\/p>\n<p>Prefer fakes:              <\/p>\n<ol>\n<li>They&#8217;re generally more versatile and reusable than stubs, dummies or mocks.<\/li>\n<li>They&#8217;ll give you a better understanding of the subject than other types of doubles.<\/li>\n<li>They can often share a code with the implementation, and thereby test that as well.<\/li>\n<li>Have the ability to directly control fakes by an interface, e.g. to put components into error mode that cannot be stimulated by normal APIs, e.g. network issues or hardware failures.<\/li>\n<\/ol>\n<p>Fake the third-party:              <\/p>\n<ol>\n<li>In my job there&#8217;s a fair amount of JNI\/JNA code that talks to hardware. By faking just the JNI methods, we can simulate various things including timeouts of failures. I&#8217;ve done similar things with faking serial devices, faking javax.comm.SerialPort and pre-loading it with fake data that simulates failures or other errors.<\/li>\n<li>This will work equally as well with RESTful APIs and the like.<\/li>\n<\/ol>\n<p><strong>Running Tests<\/strong> <\/p>\n<p>Be &#8220;realistic&#8221;:              <\/p>\n<ol>\n<li>Prefer running tests on a representative set-up using real code rather than using fakes.<\/li>\n<li>Try and run your tests out of container, so the software is run in as close to production set-up as possible.<\/li>\n<li>If software runs on specific environment, run the tests there too, i.e. integration tests are preceded by a deployment (and implicit test thereof), this in turn implies that deployment should be a button press.<\/li>\n<\/ol>\n<p>Make then repeatable:              <\/p>\n<ol>\n<li>Tests written by one person can easily be accessed by another, i.e. version controlled.<\/li>\n<li>No tedious, error prone work getting tests into version control, single button commit.<\/li>\n<li>Can they run on computers other than your dev machine?<\/li>\n<li>If it&#8217;s not automated, it&#8217;s not repeatable.<\/li>\n<\/ol>\n<p>Integrate with the build system:              <\/p>\n<ol>\n<li>You tests should run on your dev machine, and the CI server and in QA, each run will give you more confidence in the finished product.<\/li>\n<li>They should run in CI, probably headless, alongside concurrent executions of the same tests. Do they use the same hardcoded directories; are they listening on the same ports?<\/li>\n<\/ol>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.alexecollins.com\/?q=content\/testing-pt-5-running-tests\">Testing <\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Alex Collins  at the <a href=\"http:\/\/www.alexecollins.com\/\">Alex Collins &#8216;s blog<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read &#8211; opinions) together. Before I start on how best to compose your tests, I briefly ask &#8211; What are the reasons for testing? Broadly, I think they are: Reduce total number of bugs \/ increase product stability &hellip;<\/p>\n","protected":false},"author":202,"featured_media":176,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[274,273],"class_list":["post-1610","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-junit","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tips for testing with Java - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read - opinions) together. Before I start on how best\" \/>\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\/08\/tips-for-testing-with-java.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tips for testing with Java - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read - opinions) together. Before I start on how best\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.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-08-30T10:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T06:17:02+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=\"Alex Collins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex Collins\" \/>\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\\\/2012\\\/08\\\/tips-for-testing-with-java.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html\"},\"author\":{\"name\":\"Alex Collins\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/d8297de25c5373886136a5d9bd8e3f02\"},\"headline\":\"Tips for testing with Java\",\"datePublished\":\"2012-08-30T10:00:00+00:00\",\"dateModified\":\"2012-10-22T06:17:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html\"},\"wordCount\":911,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"keywords\":[\"JUnit\",\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html\",\"name\":\"Tips for testing with Java - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/junit-logo-e1426444701180.jpg\",\"datePublished\":\"2012-08-30T10:00:00+00:00\",\"dateModified\":\"2012-10-22T06:17:02+00:00\",\"description\":\"Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read - opinions) together. Before I start on how best\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/08\\\/tips-for-testing-with-java.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\\\/2012\\\/08\\\/tips-for-testing-with-java.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\":\"Tips for testing with Java\"}]},{\"@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\\\/d8297de25c5373886136a5d9bd8e3f02\",\"name\":\"Alex Collins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51ce4c7aceacb45e0ca4ae9d90c010b8b72f7aeaca8bba26b7828d5cfe36622c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51ce4c7aceacb45e0ca4ae9d90c010b8b72f7aeaca8bba26b7828d5cfe36622c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51ce4c7aceacb45e0ca4ae9d90c010b8b72f7aeaca8bba26b7828d5cfe36622c?s=96&d=mm&r=g\",\"caption\":\"Alex Collins\"},\"sameAs\":[\"http:\\\/\\\/www.alexecollins.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Alex-Collins\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tips for testing with Java - Java Code Geeks","description":"Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read - opinions) together. Before I start on how best","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\/08\/tips-for-testing-with-java.html","og_locale":"en_US","og_type":"article","og_title":"Tips for testing with Java - Java Code Geeks","og_description":"Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read - opinions) together. Before I start on how best","og_url":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-08-30T10:00:00+00:00","article_modified_time":"2012-10-22T06:17:02+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":"Alex Collins","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Alex Collins","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html"},"author":{"name":"Alex Collins","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/d8297de25c5373886136a5d9bd8e3f02"},"headline":"Tips for testing with Java","datePublished":"2012-08-30T10:00:00+00:00","dateModified":"2012-10-22T06:17:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html"},"wordCount":911,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","keywords":["JUnit","Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html","url":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html","name":"Tips for testing with Java - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/junit-logo-e1426444701180.jpg","datePublished":"2012-08-30T10:00:00+00:00","dateModified":"2012-10-22T06:17:02+00:00","description":"Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read - opinions) together. Before I start on how best","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/08\/tips-for-testing-with-java.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\/2012\/08\/tips-for-testing-with-java.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":"Tips for testing with Java"}]},{"@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\/d8297de25c5373886136a5d9bd8e3f02","name":"Alex Collins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/51ce4c7aceacb45e0ca4ae9d90c010b8b72f7aeaca8bba26b7828d5cfe36622c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/51ce4c7aceacb45e0ca4ae9d90c010b8b72f7aeaca8bba26b7828d5cfe36622c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51ce4c7aceacb45e0ca4ae9d90c010b8b72f7aeaca8bba26b7828d5cfe36622c?s=96&d=mm&r=g","caption":"Alex Collins"},"sameAs":["http:\/\/www.alexecollins.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Alex-Collins"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1610","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\/202"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1610"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1610\/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=1610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}