core: Fixed mocking in GetWatchdogQueryTest

Fixed the use of Mockito and AbstractQueryTest's methods.

Change-Id: I452a91d64fa139fbd532f0fee65a25344673f52d
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Fix GetWatchdogQueryTest's logic

The getReturnValue() method for queries always returns null, so it's
pointless to check it - what's needed is to check that no watchdogs are
returned for a non-existent ID.

Change-Id: I349a55d5a13e06a7c2e2c0ddbd8de4e0bc46f2f1
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Fix and enable GetWatchdogQuery ignored test

Fixed GetWatchdofQueryTest.executeQueryCommandWithWatchdog() and removed
the @Ignore annotation from it now that it's functioning.

This patch includes:
1. Using the infrastructure provided by AbstractQueryTest.
2. Moving general initializations (e.g., the DAO) to the setUp()
   method, where they belong.
3. Removing unneeded Mockito calls.
4. Asserting the result from getQueryReturnValue() as queries are
   supposed to instead of getReturnValue() which will always return
   null for queries.

Change-Id: I0aefd1d95cfefc4ab8391b318844dfb815f33ea5
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: GetWatchdogQueryTest: common set up

Extracted the common set up that all the tests perform to setUp()
instead of duplicating it.

Change-Id: Icaae22a21f1f3e1fa1c17356e2fc26a0e9b2dc58
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: GetWatchdogQueryTest: assertEquals params

Fixed the argument order for the assertEquals(expected, actual) calls so
that a useful message could be printed in case of a test failure.

Change-Id: Ie1413cac1597c22ecf98c3c7f3cbee6adfb1d237
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: GetWatchdogQueryTest: use Collections

Replaced the usage of Arrays.asList(vmDevice) with
Collections.singletonList(vmDevice), which is slightly less memory
consuming.

Change-Id: I51ebd9cbeefdcfdf120c23ac657f93cfd16af32a
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: GetWatchdogQueryTest spec params declaration

Fixed the spec params declaration to conform to Java 7's coding
standard.

Change-Id: I39a0ad84e827ef1676c6a7300fb73553138f21cb
Signed-off-by: Allon Mureinik <amureini@redhat.com>