core: GetHostListFromExternalProvider brackets

Removed redundant brackets.

Change-Id: I18a04efaf48f96b0b2acd7073a0c5d54764da9ea
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: GetHostListFromExternalProvider generics

Use Java 7 style generics to improve readability wherever possible.

Change-Id: Icfeaa553768b7a00437bfcda81e2e6c226bcc59d
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: UpdateVmDiskCommandTest asserts

Replace the wrong use of assert with JUnit's proper assertNotSame.

Change-Id: I6ca45b8c21c60577e2d70656fecad0ca6c31ead7
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: UpdateVmDiskCommandTest members' modifiers

Made members private as per proper Java conventions.

Change-Id: I6b3442665a2b236054ee2da56b30632e6cd415a1
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: UpdateVmDiskCommandTest generics

Use Java 7 style generics to make the code more readable.

Change-Id: Iece81799898b3ec2fdb383418d8d82f7e3e57a1a
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: UpdateVmCommandTest remove Arrays.asList

Replace single argument Arrays.asList calls with the better performing
Collections.singletonList.

Change-Id: I76b439558ccc2fc9239c0c642ba33db89f0dfda0
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: UpdateVmDiskCommand anyList()

Use anyList() instead of the cumbersome any(List.class).

Change-Id: I09dc46815c8b999e370229eb9d1b92872c4b1053
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: NetworkClusterDaoTest asserts

Replace the wrong use of assert with JUnit's proper assertTrue.

Change-Id: I89417ce3ebdc9a3fa5c20cd1b66ff2add4eed028
Signed-off-by: Allon Mureinik <amureini@redhat.com>
restapi: proper asserts in tests

Replace the wrong use of assert with JUnit's proper assertEquals.

Change-Id: If4c17c2fda25a0bffa2ba5b78db884a29b4be433
Signed-off-by: Allon Mureinik <amureini@redhat.com>
engine: Upgrade to JUnit 4.11

Upgrades to JUnit 4.11 in order to benefit from its performance
enhancements usability features.

JUnit 4.11 is slightly stricter than JUnit 4.10, so some changes were
required in order to facilitate this change:

1. Removed static modifier from members annotated with the @Rule
   annotation, as this is no longer allowed, or replaced it with
   @ClassRule wherever possible.
   Note that having a static @Rule, even if allowed in earlier
   versions of JUnit is probably a hidden bug just waiting to happen.

2. Replaced usages of JUnitMatchers, which is now deprecated, with the
   standard CoreMatchers.

3. Removed useless calls to both(Matcher) that weren't preceded by
   .and(Mathcer).

4. Removed the usage of the deprected
   org.junit.internal.matchers.TypeSafeMatcher and replaced it with
   org.hamcrest.TypeSafeMatcher (and in any event, importing a class
   with the word "internal" in its package name has a big flashing red
   light all over it).

5. Fixed the matchers' signatures in ValidationResultMatchers to use
   <? super String> instead of <String>.

6. Fixed the wrong usage of is(Integer.class) to
   is(instanceOf(Integer.class) in
   AbstractGwtDynamicHostPageServletTest.

Change-Id: I1ab9c817ac6390bd12c725b5655dbd3fdf6d0c61
Signed-off-by: Allon Mureinik <amureini@redhat.com>
engine: Replace junit.framework with org.junit

Replaced imports of deprecated junit.framework classes with their modern
org.junit counterparts.

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