<div dir="ltr">Hello,<div><br></div><div>I&#39;d like to propose the addition of the &quot;assertj&quot; lib in test scope for hawkular-metrics (and/or other modules).</div><div><br></div><div>If you don&#39;t know it, assertj is basically a &quot;fluent assertion framework&quot;. You write assertions like :</div><div><br></div><div><i><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">assertThat(result)</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">extracting(</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">DataPoint</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">::</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">getTimestamp)</span><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">.</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">containsExactly(</span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">0L</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">, </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">1L</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">, </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">5L</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">, </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">7L</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">, </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">10L</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;line-height:20px;white-space:pre-wrap;background-color:rgb(234,255,234)">);</span></i><br></div><div><br class="gmail-Apple-interchange-newline">It has a very rich collection of assertions, I find it particularly powerful when working on collections, whether they are sorted or not, whether they have nested objects or not.</div><div><br></div><div>Also, the fact that it&#39;s &quot;fluent&quot; helps a lot when you write a test, because your IDE auto-completion will help you a lot to find what&#39;s the assertion you&#39;re looking for - something that is not so easy with hamcrest.</div><div><br></div><div>I see it as a kind of virtuous cycle: tests are easier to write, easier to read, so you write more tests / better tests.</div><div><br></div><div>Would you be ok to give it a try?</div><div><br></div><div>If you want to read about it: official site is there <a href="http://joel-costigliola.github.io/assertj/">http://joel-costigliola.github.io/assertj/</a></div><div>or an article that promotes it nicely : <a href="https://www.infoq.com/articles/custom-assertions">https://www.infoq.com/articles/custom-assertions</a></div><div>or an example of file I&#39;d like to push, if you&#39;re ok with assertj :) : <a href="https://github.com/jotak/hawkular-metrics/blob/72e2f95f7e19c9433ce44ee83d15a9978503d9f5/core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/MetricsServiceImplTest.java">https://github.com/jotak/hawkular-metrics/blob/72e2f95f7e19c9433ce44ee83d15a9978503d9f5/core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/MetricsServiceImplTest.java</a></div><div><br></div><div>Joel</div></div>