XD-1022. Display module list by type.

XD-1022. Clean imports

XD-1022. Favour Assert over Preconditions.

XD-1022. Reuse existing iterators.

Add Copyright header, simplify rendering.
XD-1249 All Shell Integration Tests run from Suite
XD-1254 - Moved container setup to @BeforeClass

XD-1254 Fixed typo in Redis....Tests

XD-1254 removed System.out.println()

XD-1254 cleanup per review
Add missing ClassRule TestSupport

Since the Redis/Rabbit SingleNodeIntegrationTests' startup() method
is changed to be static, we need to apply static @ClassRule to
check the TestSupport rule for Redis/Rabbit availability.

Also, the ShellCommandsTestSuite requires ClassRule as the
AbstractShellIntegrationTest has the RedisTestSupport
Prevent NPE if no db files are present
XD-1224: Add gradle jacoco test coverage.

- Update gradle to version 1.10
- Enables the jacoco plugin for relevant projects.
- Adds an aggregate 'coverageReport' task at top level to accumulate all
the data for the sub projects.
- Removes the additional jacoco configuration for sonar. Sonar now uses
the coverage data files produced by the gradle plugin.
avoid rawtypes warnings
Miscellaneous minor improvements

Made SingleTableDatabaseInitializer.setScripts signature
consistent with super class.

Removed unneeded assertion in ContentAwareConverterRegistryTests
that fails with Spring Framework 4.0.1.
XD-1224: Remove unnecessary jacoco dependsOn config

The tests are instrumented regardless of whether the individual test
report tasks are run or not, so it isn't necessary to have the aggregate
coverageReport task depend on them.
Fix NPE on SingleNodeStreamDeployment test

- Changed the AbstractSingleNodeStreamDeploymentIntegrationTests' shutdown
method to be called after the cleanup method in MessageBus specific integration
tests. Since the cleanup methods on those classes use the context, this will
always make sure the context is available.
  - Created junit ExternalResource @ClassRule and implemented after() method
to call the shutdown so that it will be invoked after the @AfterClass based on
junit lifecycle methods.
XD-1212: Update code wrt new boot changes

The command-line property source overriding mechanism is now an
ApplicationListener for the new boot SpringApplicationEnvironmentAvailableEvent
rather than a boot SpringApplicationInitializer.

Use of @EnableBatchProcessing in ModuleDeployerTests is a workaround for
an apparent bug in boot's BatchAutoConfiguration.

forking gradle test processes

upgraded to boot 1.0 RC1
XD-1246 Run tests with existing admin/launcher

- Added RandomConfigurationSupport class that sets random config
values for:
1) Admin server port
2) HSQLDB host, port, database, dbname and data directory
3) XD deployer/undeployer name
These config values are set as system properties so that they get the
highest precedence next to commandLine properties.

- Added proeprty-placeholder configurer for "xd.deployer" and "xd.undeployer"
that defaults to existing names "xd.deployer" and "xd.undeployer". This will
enable us to override the names during tests so that the deployment requests
will be sent to the configured queues/topics/exchanges (depending on the bus)

- Fixed the tests that starts adminServer/container by adding RandomConfigurationSupport
- Fixed the xd.deployer name in ModuleDeploymentTests
- Fixed eclipse metadata file for license file to read year 2014

XD-1246 Fix review comments

- Renamed the queue/topic placeholder names
- Updated commons-io to use version variable which sets to '2.4'
Add HadoopFileSystemTestSupport Rule

- Update: Add getter for configuration

Use retries = 1
XD-1251 Allow config of Access-Control-Allow-Origin

Use can set the value xd.ui.allow_origin to override the
default (http://localhost:9889).
XD-1223 Fix testdata cleanup

- Fixed ShellIntegration tests
 - Added support to use random stream/job name inside tests to make them unique
 - Refactored some of the tests
- Fixed RabbitSingleNodeStreamDeploymentIntegrationTests, RabbitMessageBusTests,
   RabbitSingleNodeInitializationTests and RabbitJobPluginTests
 - Added cleanup logic to add the queues/exchanges used by tests and delete them
   during teardown

XD-1223 Refactor cleanup logic

- Created TestMessageBus that acts as proxy for the actual MessageBus
and provide test support such as cleanup etc.,
  - Fixed the corresponding tests
- Fixed the issue on NPE in SingleNodeStreamDeploymentIntegrationTests
where the ordering of @AfterClass methods sometimes causes this.

XD-1223 Fix review comments

- Added null check for getMessageBus() method in MessageBus/JobPluginTests.
- Used AlternativeJdkIdGenerator to generate ID for the stream/jobName
  - Also, instead of generating random stream/job name it would be the test method
    name with the generated ID being the suffix to it. One assumption here though
    is that the getStreamName() or getJobName() needs to be called from the actual
    @Test method

Fix typo

XD-1223 Inject TestMessageBus into StreamPlugin

For integration tests, inject the TestMessageBus bean into Module Deployer's
common context by TestStreamPlugin(which is wrapper for StreamPlugin) after removing the StreamPlugin from
the container context.

XD-1223 Fix review comments

- Changed the getTestMethodName() to read generateUniqueName()
- Also added a overloaded version of getStreamName(String), getJobName(String)
- Removed the setAttribute() call in TestMessageBusInjection
- Fixed method names suffix to have "Message" instead of "Msg" in AbstractJobIntegrationTest
Add RandomConfigurationSupport for tests

Add RandomConfigurationSupport for JobPluginTests and JobRepoTests
XD-1050: Allow plugins to provide Options Metadata

Use custom converter for MediaTypes

Apply to Job Plugins options

Fix JobPluginTests

Update per review + rename DefaultMOM

Disable default value handling
XD-1266: Assume use of HttpClient for twitterstream

The existing DirectFieldAccessor workaround for setting connection
properties assumed the use of a SimpleClientHttpRequestFactory. If
Apache HttpClient is on the classpath, a different instance is
dynamically chosen. This commit adds httpclient explicitly and fixes
TwitterStreamChannelAdapter to work with the different request factory.
Cleanup explicit Redis queues in Test

- Cleanup redis queues after ModuleDeploymentTests methods
Add transport check in TestMessageBus injection

It looks like the static variable testMessageBus in
AbstractSingleNodeStreamDeploymentIntegrationTests(AbstractSNSDIT) gets
a value from previously loaded test class (ex: RabbitSNSDIT) and
thereby non-null check on TestMessageBus injection fails if the class
LocalSNSDIT is loaded after RabbitSNSDIT. Hence, added an additional
check to verify if the transport is local as it is LocalSNSDIT that
doesn't set the testMessageBus.