Hamcrest has containsKey as well. I have modified the test so that it checks the keys and the size altogether. 

----- Original Message -----

> From: "David Mason" <notifications@github.com>
> To: "zanata/zanata-server" <zanata-server@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Tuesday, April 29, 2014 12:38:54 PM
> Subject: Re: [zanata-server] rhbz1062508 - disable spellcheck in codemirror
> and add key shortcut to switch between editor for current row (#379)

> In
> zanata-war/src/test/java/org/zanata/webtrans/client/service/UserOptionsServiceTest.java:
> > @@ -155,8 +155,6 @@ public void getEditorOptions() {
> >                  Matchers.equalTo(true));
> >          assertThat(map.containsKey(UserOptions.TransMemoryDisplayMode),
> >                  Matchers.equalTo(true));
> > -        assertThat(map.containsKey(UserOptions.EnableSpellCheck),
> > -                Matchers.equalTo(true));

> This block could be updated to use containsKeys from assertj containsKeys
> documentation

> I haven't found a method to avoid the additional size check, unfortunately.
> It might be good to move the size check after the other checks, since it
> will usually be more useful to see specifically what is missing rather than
> just that something is missing.

> —
> Reply to this email directly or view it on GitHub .