{"id":1359,"date":"2012-06-21T16:00:00","date_gmt":"2012-06-21T16:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/nosqlunit-0-3-0-released.html"},"modified":"2012-10-22T05:30:40","modified_gmt":"2012-10-22T05:30:40","slug":"nosqlunit-030-released","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html","title":{"rendered":"NoSQLUnit 0.3.0 Released"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\"><b>Introduction<\/strong><\/p>\n<p>Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the           <i>FIRST<\/i> Rules; these are Fast, Isolated, Repeatable, Self-Validated and Timely.<br \/>\nIt is strange to think about a           <i>JEE<\/i> application without persistence layer (typical Relational databases or new           <strong>NoSQL<\/strong> databases) so should be interesting to write unit tests of persistence layer too. When we are writing unit tests of persistence layer we should focus on to not break two main concepts of           <i>FIRST<\/i> rules, the fast and the isolated ones.                              <\/p>\n<p>Our tests will be fast if they don&#8217;t access network nor filesystem, and in case of persistence systems network and filesystem are the most used resources. In case of           <i>RDBMS<\/i> ( SQL ), many Java in-memory databases exist like           <i>Apache Derby<\/i> ,           <i>H2<\/i> or           <i>HSQLDB<\/i> . These databases, as their name suggests are embedded into your program and data are stored in memory, so your tests are still fast. The problem is with           <strong>NoSQL<\/strong> systems, because of their heterogeneity. Some systems work using Document approach (like           <i>MongoDb<\/i> ), other ones Column (like           <i>Hbase<\/i> ), or Graph (like           <i>Neo4J<\/i> ). For this reason the in-memory mode should be provided by the vendor, there is no a generic solution.                              <\/p>\n<p>Our tests must be isolated from themselves. It is not acceptable that one test method modifies the result of another test method. In case of persistence tests this scenario occurs when previous test method insert an entry to database and next test method execution finds the change. So before execution of each test, database should be found in a known state. Note that if your test found database in a known state, test will be repeatable, if test assertion depends on previous test execution, each execution will be unique. For homogeneous systems like           <i>RDBMS<\/i> ,           <i>DBUnit<\/i> exists to maintain database in a known state before each execution. But there is no like           <i>DBUnit<\/i> framework for heterogeneous           <strong>NoSQL<\/strong> systems.                              <\/p>\n<p><a href=\"https:\/\/github.com\/lordofthejars\/nosql-unit\">NoSQLUnit<\/a> resolves this problem by providing a           <strong>JUnit<\/strong> extension which helps us to manage lifecycle of           <strong>NoSQL<\/strong> systems and also take care of maintaining databases into known state.                   <\/p>\n<p><strong>NoSQLUnit<\/strong>        <\/p>\n<p><strong>NoSQLUnit<\/strong> is a           <strong>JUnit<\/strong> extension to make writing unit and integration tests of systems that use           <strong>NoSQL<\/strong> backend easier and is composed by two sets of           <i>Rules<\/i> and a group of annotations.<br \/>\nFirst set of           <i>Rules<\/i> are those responsible of managing database lifecycle; there are two for each supported backend.                              <\/p>\n<ul>\n<li>The first one (in case it is possible) it is the in-memory mode. This mode takes care of starting and stopping database system in &#8216;in-memory&#8217; mode. This mode will be typically used during unit testing execution.<\/li>\n<\/ul>\n<ul>\n<li>The second one is the managed mode. This mode is in charge of starting <strong>NoSQL<\/strong> server but as remote process (in local machine) and stopping it. This will typically used during integration testing execution.<\/li>\n<\/ul>\n<p>Second set of           <i>Rules<\/i> are those responsible of maintaining database into known state. Each supported backend will have its own, and can be understood as a connection to defined database which will be used to execute the required operations for maintaining the stability of the system.                              <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Note that because           <strong>NoSQL<\/strong> databases are heterogeneous, each system will require its own implementation.<br \/>\nAnd finally two annotations are provided,           <i>@UsingDataSet<\/i> and           <i>@ShouldMatchDataSet<\/i> , (thank you so much Arquillian people for the name) to specify locations of datasets and expected datasets.                              <\/p>\n<p><strong>MongoDb Example<\/strong>                             <strong><br \/>\n<\/strong><br \/>\nNow I am going to explain a very simple example of how to use NoSQLUnit, for full explanation of all features provided, please read documentation in           <a href=\"http:\/\/lordofthejars.github.com\/nosql-unit\/nosqlunit.html\">link<\/a> or           <a href=\"http:\/\/lordofthejars.github.com\/nosql-unit\/nosqlunit.pdf\">download<\/a> in pdf format.<br \/>\nTo use           <strong>NoSQLUnit<\/strong> with           <i>MongoDb<\/i> you only need to add next dependency:<span style=\"background-color: white\"><\/span><\/p>\n<pre class=\"brush:java\"> &lt;dependency&gt;\r\n  &lt;groupId&gt;com.lordofthejars&lt;groupId&gt;\r\n  &lt;artifactId&gt;nosqlunit-mongodb&lt;artifactId&gt;\r\n  &lt;version&gt;0.3.0&lt;version&gt;\r\n &lt;dependency&gt;\r\n<\/pre>\n<p>First step is defining which lifecycle management strategy is required for your tests. Depending on kind of test you are implementing (unit test, integration test, deployment test, &#8230;) you will require an           <strong>in-memory<\/strong> approach,           <strong>managed<\/strong> approach or           <strong>remote<\/strong> approach.          <\/p>\n<p>For this example we are going to use           <strong>managed<\/strong> approach using           <i>ManagedMongoDb<\/i> Rule) but note that           <strong>in-memory<\/strong>           <strong>MongoDb<\/strong> management is also supported (see documentation how).          <\/p>\n<p>Next step is configuring           <strong>Mongodb<\/strong> rule in charge of maintaining           <strong>MongoDb<\/strong> database into known state by inserting and deleting defined datasets. You must register           <i>MongoDbRule<\/i>           <strong>JUnit<\/strong> rule class, which requires a configuration parameter with information like host, port or database name.          <\/p>\n<p>To make developer&#8217;s life easier and code more readable, a fluent interface can be used to create these configuration objects.          <\/p>\n<p>Let&#8217;s see the code:          <\/p>\n<p>First thing is a simple           <i>POJO<\/i> class that will be used as model class:<\/p>\n<pre class=\"brush:java\"> public class Book {\r\n \r\n  private String title;\r\n \r\n  private int numberOfPages;\r\n \r\n  public Book(String title, int numberOfPages) {\r\n   super();\r\n   this.title = title;\r\n   this.numberOfPages = numberOfPages;\r\n  }\r\n \r\n  public void setTitle(String title) {\r\n   this.title = title;\r\n  }\r\n \r\n  public void setNumberOfPages(int numberOfPages) {\r\n   this.numberOfPages = numberOfPages;\r\n  }\r\n \r\n \r\n  public String getTitle() {\r\n   return title;\r\n  }\r\n \r\n  public int getNumberOfPages() {\r\n   return numberOfPages;\r\n  }\r\n }\r\n<\/pre>\n<p>Next business class is the responsible of managing access to           <strong>MongoDb<\/strong> server:<span style=\"background-color: white\"><\/span><\/p>\n<pre class=\"brush:java\"> public class BookManager {\r\n \r\n  private static final Logger LOGGER = LoggerFactory.getLogger(BookManager.class);\r\n \r\n  private static final MongoDbBookConverter MONGO_DB_BOOK_CONVERTER = new MongoDbBookConverter();\r\n  private static final DbObjectBookConverter DB_OBJECT_BOOK_CONVERTER = new DbObjectBookConverter();\r\n \r\n \r\n  private DBCollection booksCollection;\r\n \r\n  public BookManager(DBCollection booksCollection) {\r\n   this.booksCollection = booksCollection;\r\n  }\r\n \r\n  public void create(Book book) {\r\n   DBObject dbObject = MONGO_DB_BOOK_CONVERTER.convert(book);\r\n   booksCollection.insert(dbObject);\r\n  }\r\n }<\/pre>\n<p>And now it is time for testing. In next test we are going to validate that a           <i>book<\/i> is inserted correctly into database.<span style=\"background-color: white\"><\/span><\/p>\n<pre class=\"brush:java\"> package com.lordofthejars.nosqlunit.demo.mongodb;\r\n \r\n public class WhenANewBookIsCreated {\r\n \r\n  @ClassRule\r\n  public static ManagedMongoDb managedMongoDb = newManagedMongoDbRule().mongodPath('optmongo').build();\r\n \r\n  @Rule\r\n  public MongoDbRule remoteMongoDbRule = new MongoDbRule(mongoDb().databaseName('test').build());\r\n \r\n  @Test\r\n  @UsingDataSet(locations='initialData.json', loadStrategy=LoadStrategyEnum.CLEAN_INSERT)\r\n  @ShouldMatchDataSet(location='expectedData.json')\r\n  public void book_should_be_inserted_into_repository() {\r\n \r\n   BookManager bookManager = new BookManager(MongoDbUtil.getCollection(Book.class.getSimpleName()));\r\n \r\n   Book book = new Book('The Lord Of The Rings', 1299);\r\n   bookManager.create(book);\r\n  }\r\n \r\n }\r\n<\/pre>\n<p>See that first of all we are creating using           <i>ClassRule<\/i> annotation a managed connection to           <strong>MongoDb<\/strong> server. In this case we are configuring           <strong>MongoDb<\/strong> path programmatically, but also can be set from           <i>MONGO_HOME<\/i> environment variable. See           <a href=\"http:\/\/lordofthejars.github.com\/nosql-unit\/nosqlunit.html#program.managed_conf\">here<\/a> full description of all available parameters.          <\/p>\n<p>This           <i>Rule<\/i> will be executed when test is loaded and will start a           <strong>MongoDb<\/strong> instance. Also will shutdown the server when all tests have been executed.          <\/p>\n<p>Next           <i>Rule<\/i> is executed before any test method, and is responsible of maintaining database into known state. Note that we are only configuring working database, in this case the           <i>test<\/i> one.          <\/p>\n<p>And finally we annotate method test with           <i>@UsingDataSet<\/i> indicating where to find data to be inserted before execution of each test, and           <i>@ShouldMatchDataSet<\/i> locating expected dataset.<\/p>\n<pre class=\"brush:java\"> {\r\n  'Book':\r\n  [\r\n   {'title':'The Hobbit','numberOfPages':293}\r\n  ]\r\n }\r\n<\/pre>\n<pre class=\"brush:java\"> {\r\n  'Book':\r\n  [\r\n   {'title':'The Hobbit','numberOfPages':293},\r\n   {'title':'The Lord Of The Rings','numberOfPages':1299}\r\n  ]\r\n }\r\n<\/pre>\n<p>We are setting an initial dataset in file           <i>initialData.json<\/i> located at classpath           <i>com\/lordofthejars\/nosqlunit\/demo\/mongodb\/initialData.json<\/i> and expected dataset called           <i>expectedData.json<\/i>.          <\/p>\n<p><strong>Final Notes<\/strong>         <\/p>\n<p>Although           <strong>NoSQLUnit<\/strong> is at early stages, the part of           <strong>MongoDb<\/strong> is almost finished, in next releases new features and of course new databases will be supported. Next           <strong>NoSQL<\/strong> supported engines will be           <i>Neo4J<\/i>,           <i>Cassandra<\/i>,           <i>HBase<\/i> and           <i>CouchDb<\/i>.          <\/p>\n<p>Also read the           <a href=\"http:\/\/lordofthejars.github.com\/nosql-unit\/nosqlunit.html\">documentation<\/a> where you will find an full explanation of each feature explained here.          <\/p>\n<p>And finally any suggestion you have, any recommendation, or any advice will be welcomed.          <\/p>\n<p>Keep Learning!<\/p>\n<p><a href=\"https:\/\/github.com\/lordofthejars\/nosql-unit\/tree\/master\/nosqlunit-demo\">Full Code<\/a><\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.lordofthejars.com\/2012\/06\/nosqlunit-030-released.html\">NoSQLUnit 0.3.0 Released<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Alex Soto at the <a href=\"http:\/\/www.lordofthejars.com\/\">One Jar To Rule Them All<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these are Fast, Isolated, Repeatable, Self-Validated and Timely. It is strange to think about a JEE application without persistence layer (typical Relational databases or new NoSQL databases) so should be interesting &hellip;<\/p>\n","protected":false},"author":119,"featured_media":194,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[528,273],"class_list":["post-1359","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-nosqlunit","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>NoSQLUnit 0.3.0 Released - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NoSQLUnit 0.3.0 Released - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-06-21T16:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T05:30:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/nosqlunit-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alex Soto\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/alexsotob\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alex Soto\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html\"},\"author\":{\"name\":\"Alex Soto\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/6566a1238c71f5d85ba5b5df5d2eac59\"},\"headline\":\"NoSQLUnit 0.3.0 Released\",\"datePublished\":\"2012-06-21T16:00:00+00:00\",\"dateModified\":\"2012-10-22T05:30:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html\"},\"wordCount\":1027,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/nosqlunit-logo.jpg\",\"keywords\":[\"NoSQLUnit\",\"Testing\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html\",\"name\":\"NoSQLUnit 0.3.0 Released - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/nosqlunit-logo.jpg\",\"datePublished\":\"2012-06-21T16:00:00+00:00\",\"dateModified\":\"2012-10-22T05:30:40+00:00\",\"description\":\"Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/nosqlunit-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/nosqlunit-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/nosqlunit-030-released.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\":\"NoSQLUnit 0.3.0 Released\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/6566a1238c71f5d85ba5b5df5d2eac59\",\"name\":\"Alex Soto\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g\",\"caption\":\"Alex Soto\"},\"sameAs\":[\"http:\\\/\\\/www.lordofthejars.com\\\/\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/alexsotob\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Alex-Soto\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NoSQLUnit 0.3.0 Released - Java Code Geeks","description":"Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html","og_locale":"en_US","og_type":"article","og_title":"NoSQLUnit 0.3.0 Released - Java Code Geeks","og_description":"Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these","og_url":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-06-21T16:00:00+00:00","article_modified_time":"2012-10-22T05:30:40+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/nosqlunit-logo.jpg","type":"image\/jpeg"}],"author":"Alex Soto","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/alexsotob","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Alex Soto","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html"},"author":{"name":"Alex Soto","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/6566a1238c71f5d85ba5b5df5d2eac59"},"headline":"NoSQLUnit 0.3.0 Released","datePublished":"2012-06-21T16:00:00+00:00","dateModified":"2012-10-22T05:30:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html"},"wordCount":1027,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/nosqlunit-logo.jpg","keywords":["NoSQLUnit","Testing"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html","url":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html","name":"NoSQLUnit 0.3.0 Released - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/nosqlunit-logo.jpg","datePublished":"2012-06-21T16:00:00+00:00","dateModified":"2012-10-22T05:30:40+00:00","description":"Introduction Unit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/nosqlunit-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/nosqlunit-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/nosqlunit-030-released.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":"NoSQLUnit 0.3.0 Released"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/6566a1238c71f5d85ba5b5df5d2eac59","name":"Alex Soto","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc3a211b790033d32fee33bb321b7bb6e2d381dab14531d3f2e8df9885bca7f9?s=96&d=mm&r=g","caption":"Alex Soto"},"sameAs":["http:\/\/www.lordofthejars.com\/","https:\/\/x.com\/http:\/\/twitter.com\/alexsotob"],"url":"https:\/\/www.javacodegeeks.com\/author\/Alex-Soto"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/119"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1359"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1359\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/194"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}