{"id":84501,"date":"2018-12-14T19:00:07","date_gmt":"2018-12-14T17:00:07","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=84501"},"modified":"2018-12-14T14:02:39","modified_gmt":"2018-12-14T12:02:39","slug":"unit-testing-anti-patterns-full-list","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html","title":{"rendered":"Unit Testing Anti-Patterns, Full List"},"content":{"rendered":"<p>I wrote some time ago about <a href=\"https:\/\/www.yegor256.com\/2014\/09\/10\/anti-patterns-in-oop.html\">anti-patterns in OOP<\/a>. Now it\u2019s time to write about unit testing anti-patterns\u2014because they also exist, and there are many. I will try to include every example I know in this list. If you know any others, please add them via a <a href=\"https:\/\/github.com\/yegor256\/blog\">pull request<\/a> or post a comment below. For each anti-pattern I will try to mention where it was found, if it\u2019s not mine. Keep in mind that if I found it somewhere, that doesn\u2019t necessarily mean it was invented there. If you spot an error, please comment.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"577\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/breaking-bad-1-1024x577.jpg\" alt=\"Testing Anti-Patterns\" class=\"wp-image-84514\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/breaking-bad-1-1024x577.jpg 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/breaking-bad-1-300x169.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/breaking-bad-1-768x432.jpg 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/breaking-bad-1.jpg 1762w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<p><strong>Cuckoo<\/strong><sup>1<\/sup> (aka Stranger<sup>3<\/sup>). This is a test method that sits in the same unit test but doesn\u2019t really belong there.<\/p>\n<p><strong>Test-per-Method<\/strong><sup>1<\/sup>. Although a one-to-one relationship between test and production classes is a reasonable starting point, a one-to-one relationship between test and production method is almost always a bad idea.<\/p>\n<p><strong>Anal Probe<\/strong><sup>2<\/sup>. A test that has to use unhealthy ways to perform its task, such as reading private fields using reflection.<\/p>\n<p><strong>Conjoined Twins<\/strong><sup>2<\/sup>. Tests that are called unit tests but are really integration tests since there is no isolation between the system-under-test and the tests.<\/p>\n<p><strong>Happy Path<\/strong> (aka Success Against All Odds<sup>3<\/sup>, Liar<sup>3<\/sup>). The tests stay on happy paths (i.e. expected results) without testing for boundaries and exceptions.<\/p>\n<p><strong>Slow Poke<\/strong><sup>3<\/sup>. A unit test that runs incredibly slow. When developers kick it off, they have time to go to the bathroom, grab a smoke, or worse, kick the test off before they go home at the end of the day.<\/p>\n<p><strong>Giant<\/strong><sup>3<\/sup>. A unit test that, although it is validly testing the object under test, can span thousands of lines and contain many many test cases. This can be an indicator that the system-under-test is a God Object.<\/p>\n<p><strong>Mockery<\/strong><sup>3<\/sup>. Sometimes mocking can be good, and handy. But sometimes developers can lose themselves in their effort to mock out what isn\u2019t being tested. In this case, a unit test contains so many mocks, stubs, and\/or fakes that the system under test isn\u2019t even being tested at all, instead data returned from mocks is what is being tested.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><strong>Inspector<\/strong><sup>3<\/sup>. A unit test that violates encapsulation in an effort to achieve 100% code coverage, but knows so much about what is going on in the object that any attempt to refactor will break the existing test and require any change to be reflected in the unit test.<\/p>\n<p><strong>Generous Leftovers<\/strong><sup>3<\/sup> (aka <a href=\"https:\/\/stackoverflow.com\/a\/333814\/187141\">Chain Gang<\/a>, <a href=\"https:\/\/stackoverflow.com\/a\/2150985\/187141\">Wet Floor<\/a>). An instance where one unit test creates data that is persisted somewhere, and another test reuses the data for its own devious purposes. If the \u201cgenerator\u201d is ran afterward, or not at all, the test using that data will outright fail.<\/p>\n<p><strong>Local Hero<\/strong><sup>3<\/sup> (aka Hidden Dependency, Operating System Evangelist, <a href=\"https:\/\/stackoverflow.com\/a\/339339\/187141\">Wait and See<\/a>, <a href=\"https:\/\/stackoverflow.com\/a\/339297\/187141\">Environmental Vandal<\/a>). A test case that is dependent on something specific to the development environment it was written on, in order to run. The result is that the test passes on development boxes, but fails when someone attempts to run it elsewhere.<\/p>\n<p><strong>Nitpicker<\/strong><sup>3<\/sup>. A unit test which compares a complete output when it\u2019s really only interested in small parts of it, so the test has to continually be kept in line with otherwise unimportant details.<\/p>\n<p><strong>Secret Catcher<\/strong><sup>3<\/sup>. A test that at first glance appears to be doing no testing due to the absence of assertions, but as they say, \u201cthe devil is in the details.\u201d The test is really relying on an exception to be thrown when a mishap occurs, and is expecting the testing framework to capture the exception and report it to the user as a failure.<\/p>\n<p><strong>Dodger<\/strong><sup>3<\/sup>. A unit test which has lots of tests for minor (and presumably easy to test) side effects, but never tests the core desired behavior. Sometimes you may find this in database access related tests, where a method is called, then the test selects from the database and runs assertions against the result.<\/p>\n<p><strong>Loudmouth<\/strong><sup>3<\/sup>. A unit test (or test suite) that clutters up the console with diagnostic messages, logging, and other miscellaneous chatter, even when tests are passing.<\/p>\n<p><strong>Greedy Catcher<\/strong><sup>3<\/sup>. A unit test which catches exceptions and swallows the stack trace, sometimes replacing it with a less informative failure message, but sometimes even just logging (cf. Loudmouth) and letting the test pass.<\/p>\n<p><strong>Sequencer<\/strong><sup>3<\/sup>. A unit test that depends on items in an unordered list appearing in the same order during assertions.<\/p>\n<p><strong>Enumerator<\/strong><sup>3<\/sup> (aka <a href=\"https:\/\/stackoverflow.com\/a\/336766\/187141\">Test With No Name<\/a>). Unit tests where each test case method name is only an enumeration, e.g. <code>test1<\/code>, <code>test2<\/code>, <code>test3<\/code>. As a result, the intention of the test case is unclear, and the only way to be sure is to read the test case code and pray for clarity.<\/p>\n<p><strong>Free Ride<\/strong><sup>3<\/sup> (aka <a href=\"https:\/\/stackoverflow.com\/a\/333883\/187141\">Piggyback<\/a>). Rather than write a new test case method to test another feature or functionality, a new assertion rides along in an existing test case.<\/p>\n<p><strong>Excessive Setup<\/strong><sup>3<\/sup> (aka <a href=\"https:\/\/stackoverflow.com\/a\/333909\/187141\">Mother Hen<\/a>). A test that requires a lot of work to set up in order to even begin testing. Sometimes several hundred lines of code are used to setup the environment for one test, with several objects involved, which can make it difficult to really ascertain what is being tested due to the \u201cnoise\u201d of all of the setup.<\/p>\n<p><strong>Line hitter<\/strong>. At first glance, the tests cover everything and code coverage tools confirm it with 100%, but in reality the tests merely hit the code, without doing any output analysis.<\/p>\n<p><strong>Forty-Foot Pole Test<\/strong> (<a href=\"https:\/\/stackoverflow.com\/a\/339247\/187141\">see<\/a>). Afraid of getting too close to the class they are trying to test, these tests act at a distance, separated by countless layers of abstraction and thousands of lines of code from the logic they are checking.<\/p>\n<p>Useful links:<\/p>\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/amzn.to\/2BaAKRB\"><em>Spock: Up and Running<\/em><\/a> by Rob Fletcher<\/li>\n<li><a href=\"https:\/\/amzn.to\/2DpkFc6\"><em>Mastering Software Testing with JUnit 5<\/em><\/a> by Boni Garcia<\/li>\n<li><a href=\"http:\/\/archive.is\/3acB#selection-119.0-119.17\">TDD Anti-Patterns<\/a> by James Carr<\/li>\n<\/ol>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Yegor Bugayenko, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/www.yegor256.com\/2018\/12\/11\/unit-testing-anti-patterns.html\" target=\"_blank\" rel=\"noopener\">Unit Testing Anti-Patterns, Full List<\/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>I wrote some time ago about anti-patterns in OOP. Now it\u2019s time to write about unit testing anti-patterns\u2014because they also exist, and there are many. I will try to include every example I know in this list. If you know any others, please add them via a pull request or post a comment below. For &hellip;<\/p>\n","protected":false},"author":593,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[273],"class_list":["post-84501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-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 Anti-Patterns, Full List - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about Testing Anti-Patterns? Check our article presenting unit testing anti-patters include every example in the list.\" \/>\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\/2018\/12\/unit-testing-anti-patterns-full-list.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unit Testing Anti-Patterns, Full List - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Testing Anti-Patterns? Check our article presenting unit testing anti-patters include every example in the list.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.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:\/\/www.facebook.com\/yegor256\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-14T17:00:07+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=\"Yegor Bugayenko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/yegor256\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yegor Bugayenko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html\"},\"author\":{\"name\":\"Yegor Bugayenko\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/f3ff9c97ecd948f271ebc5ead401d02d\"},\"headline\":\"Unit Testing Anti-Patterns, Full List\",\"datePublished\":\"2018-12-14T17:00:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html\"},\"wordCount\":1005,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html\",\"name\":\"Unit Testing Anti-Patterns, Full List - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2018-12-14T17:00:07+00:00\",\"description\":\"Interested to learn about Testing Anti-Patterns? Check our article presenting unit testing anti-patters include every example in the list.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.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\\\/2018\\\/12\\\/unit-testing-anti-patterns-full-list.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 Anti-Patterns, Full List\"}]},{\"@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\\\/f3ff9c97ecd948f271ebc5ead401d02d\",\"name\":\"Yegor Bugayenko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c3696c78da79ebdd9ffa8e87e8832461b7cd59659483373b34da4ae25dfb573a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c3696c78da79ebdd9ffa8e87e8832461b7cd59659483373b34da4ae25dfb573a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c3696c78da79ebdd9ffa8e87e8832461b7cd59659483373b34da4ae25dfb573a?s=96&d=mm&r=g\",\"caption\":\"Yegor Bugayenko\"},\"description\":\"Yegor Bugayenko is an Oracle certified Java architect, CEO of Zerocracy, author of Elegant Objects book series about object-oriented programing, lead architect and founder of Cactoos, Takes, Rultor and Jcabi, and a big fan of test automation.\",\"sameAs\":[\"http:\\\/\\\/www.yegor256.com\\\/\",\"https:\\\/\\\/www.facebook.com\\\/yegor256\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/yegor256\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/yegor256\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/yegor-bugayenko\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unit Testing Anti-Patterns, Full List - Java Code Geeks","description":"Interested to learn about Testing Anti-Patterns? Check our article presenting unit testing anti-patters include every example in the list.","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\/2018\/12\/unit-testing-anti-patterns-full-list.html","og_locale":"en_US","og_type":"article","og_title":"Unit Testing Anti-Patterns, Full List - Java Code Geeks","og_description":"Interested to learn about Testing Anti-Patterns? Check our article presenting unit testing anti-patters include every example in the list.","og_url":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/yegor256","article_published_time":"2018-12-14T17:00:07+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":"Yegor Bugayenko","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/yegor256","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Yegor Bugayenko","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html"},"author":{"name":"Yegor Bugayenko","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/f3ff9c97ecd948f271ebc5ead401d02d"},"headline":"Unit Testing Anti-Patterns, Full List","datePublished":"2018-12-14T17:00:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html"},"wordCount":1005,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html","url":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html","name":"Unit Testing Anti-Patterns, Full List - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2018-12-14T17:00:07+00:00","description":"Interested to learn about Testing Anti-Patterns? Check our article presenting unit testing anti-patters include every example in the list.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/unit-testing-anti-patterns-full-list.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\/2018\/12\/unit-testing-anti-patterns-full-list.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 Anti-Patterns, Full List"}]},{"@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\/f3ff9c97ecd948f271ebc5ead401d02d","name":"Yegor Bugayenko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c3696c78da79ebdd9ffa8e87e8832461b7cd59659483373b34da4ae25dfb573a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c3696c78da79ebdd9ffa8e87e8832461b7cd59659483373b34da4ae25dfb573a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3696c78da79ebdd9ffa8e87e8832461b7cd59659483373b34da4ae25dfb573a?s=96&d=mm&r=g","caption":"Yegor Bugayenko"},"description":"Yegor Bugayenko is an Oracle certified Java architect, CEO of Zerocracy, author of Elegant Objects book series about object-oriented programing, lead architect and founder of Cactoos, Takes, Rultor and Jcabi, and a big fan of test automation.","sameAs":["http:\/\/www.yegor256.com\/","https:\/\/www.facebook.com\/yegor256","https:\/\/www.linkedin.com\/in\/yegor256","https:\/\/x.com\/https:\/\/twitter.com\/yegor256"],"url":"https:\/\/www.javacodegeeks.com\/author\/yegor-bugayenko"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/84501","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\/593"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=84501"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/84501\/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=84501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=84501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=84501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}