Index: src/webapp/apigility/module/Application/config/module.config.php
===================================================================
--- src/webapp/apigility/module/Application/config/module.config.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/config/module.config.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace Application;
+
+use Zend\ServiceManager\Factory\InvokableFactory;
+
+return [
+    'router' => [
+        'routes' => [
+            'home' => [
+                'type' => 'Literal',
+                'options' => [
+                    'route'    => '/',
+                    'defaults' => [
+                        'controller' => Controller\IndexController::class,
+                        'action'     => 'index',
+                    ],
+                ],
+            ],
+        ],
+    ],
+    'controllers' => [
+        'factories' => [
+            Controller\IndexController::class => InvokableFactory::class,
+        ],
+    ],
+    'view_manager' => [
+        'display_not_found_reason' => true,
+        'display_exceptions'       => true,
+        'doctype'                  => 'HTML5',
+        'not_found_template'       => 'error/404',
+        'exception_template'       => 'error/index',
+        'template_map' => [
+            'layout/layout'           => __DIR__ . '/../view/layout/layout.phtml',
+            'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
+            'error/404'               => __DIR__ . '/../view/error/404.phtml',
+            'error/index'             => __DIR__ . '/../view/error/index.phtml',
+        ],
+        'template_path_stack' => [
+            __DIR__ . '/../view',
+        ],
+    ],
+];
Index: src/webapp/apigility/module/Application/src/Controller/IndexController.php
===================================================================
--- src/webapp/apigility/module/Application/src/Controller/IndexController.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/src/Controller/IndexController.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace Application\Controller;
+
+use Zend\Mvc\Controller\AbstractActionController;
+use Zend\View\Model\ViewModel;
+use ZF\Apigility\Admin\Module as AdminModule;
+
+class IndexController extends AbstractActionController
+{
+    public function indexAction()
+    {
+        if (class_exists(AdminModule::class, false)) {
+            return $this->redirect()->toRoute('zf-apigility/ui');
+        }
+        return new ViewModel();
+    }
+}
Index: src/webapp/apigility/module/Application/src/Module.php
===================================================================
--- src/webapp/apigility/module/Application/src/Module.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/src/Module.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,15 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace Application;
+
+class Module
+{
+    public function getConfig()
+    {
+        return include __DIR__ . '/../config/module.config.php';
+    }
+}
Index: src/webapp/apigility/module/Application/test/Controller/IndexControllerTest.php
===================================================================
--- src/webapp/apigility/module/Application/test/Controller/IndexControllerTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/test/Controller/IndexControllerTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,56 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace ApplicationTest\Controller;
+
+use Application\Controller\IndexController;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
+
+class IndexControllerTest extends AbstractHttpControllerTestCase
+{
+    public function setUp()
+    {
+        // The module configuration should still be applicable for tests.
+        // You can override configuration here with test case specific values,
+        // such as sample view templates, path stacks, module_listener_options,
+        // etc.
+        $configOverrides = [
+            'module_listener_options' => [
+                'config_cache_enabled' => false,
+            ],
+        ];
+
+        $this->setApplicationConfig(ArrayUtils::merge(
+            include __DIR__ . '/../../../../config/application.config.php',
+            $configOverrides
+        ));
+
+        parent::setUp();
+    }
+
+    public function testIndexActionCanBeAccessed()
+    {
+        $this->dispatch('/', 'GET');
+        $this->assertResponseStatusCode(200);
+        $this->assertModuleName('application');
+        $this->assertControllerName(IndexController::class); // as specified in router's controller name alias
+        $this->assertControllerClass('IndexController');
+        $this->assertMatchedRouteName('home');
+    }
+
+    public function testIndexActionViewModelTemplateRenderedWithinLayout()
+    {
+        $this->dispatch('/', 'GET');
+        $this->assertQuery('.hero-unit');
+    }
+
+    public function testInvalidRouteDoesNotCrash()
+    {
+        $this->dispatch('/invalid/route', 'GET');
+        $this->assertResponseStatusCode(404);
+    }
+}
Index: src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php
===================================================================
--- src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/test/Controller/ZZIndexControllerDevModeTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,54 @@
+<?php
+/**
+ * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
+ * @copyright Copyright (c) 2016 Zend Technologies USA Inc. (http://www.zend.com)
+ */
+
+namespace ApplicationTest\Controller;
+
+use Application\Controller\IndexController;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
+
+/**
+ * Name is intentional, to force it to run last; this was necessary as,
+ * once the Admin module is loaded, the controller is able to find it and
+ * will attempt the redirect.
+ */
+class ZZIndexControllerDevModeTest extends AbstractHttpControllerTestCase
+{
+    public function setUp()
+    {
+        // The module configuration should still be applicable for tests.
+        // You can override configuration here with test case specific values,
+        // such as sample view templates, path stacks, module_listener_options,
+        // etc.
+        $configOverrides = [
+            'modules' => [
+                'ZF\Apigility\Admin',
+                'ZF\Apigility\Admin\Ui',
+            ],
+            'module_listener_options' => [
+                'config_cache_enabled' => false,
+                'config_glob_paths' => [
+                    __DIR__ . '/../../../../config/autoload/{,*.}{global,local}.php',
+                    __DIR__ . '/../../../../config/autoload/{,*.}{global,local}-development.php',
+                ],
+            ]
+        ];
+
+        $this->setApplicationConfig(ArrayUtils::merge(
+            include __DIR__ . '/../../../../config/application.config.php',
+            $configOverrides
+        ));
+
+        parent::setUp();
+    }
+
+    public function testIndexActionRedirectsToAdminUi()
+    {
+        $this->dispatch('/', 'GET');
+        $this->assertResponseStatusCode(302);
+        $this->assertRedirectRegex('#/ui$#');
+    }
+}
Index: src/webapp/apigility/module/Application/view/application/index/index.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/application/index/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/application/index/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,11 @@
+<div class="hero-unit">
+    <p align="center"><img src="/img/ag-hero.png" alt="Apigility <?= \Apigility\VERSION ?>"></p>
+</div>
+<div class="row">
+    <div class="span8">
+        <p><br /><br />In order to use the <strong>Apigility Admin UI</strong> you need to enable the <strong>development</strong> mode. Currently your application is running in <strong>production</strong> mode.</p>
+        <p>To enable the development mode you can execute the following command from the terminal:</p>
+        <p><pre>$ composer development-enable</pre></p>
+        <p>Remember to set always the production mode if you want to deploy your API in a staging/production environment.</p>
+    </div>
+</div>
Index: src/webapp/apigility/module/Application/view/error/404.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/error/404.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/error/404.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,108 @@
+<?php
+use Zend\Mvc\Application;
+?>
+<h1>A 404 error occurred</h1>
+<h2><?= $this->message ?></h2>
+
+<?php
+if (! empty($this->reason)) :
+    $reasonMessage = '';
+    switch ($this->reason) {
+        case Application::ERROR_CONTROLLER_CANNOT_DISPATCH:
+            $reasonMessage = 'The requested controller was unable to dispatch the request.';
+            break;
+        case Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH:
+            $reasonMessage = 'The requested middleware was unable to dispatch the request.';
+            break;
+        case Application::ERROR_CONTROLLER_NOT_FOUND:
+            $reasonMessage = 'The requested controller could not be mapped to an existing controller class.';
+            break;
+        case Application::ERROR_CONTROLLER_INVALID:
+            $reasonMessage = 'The requested controller was not dispatchable.';
+            break;
+        case Application::ERROR_ROUTER_NO_MATCH:
+            $reasonMessage = 'The requested URL could not be matched by routing.';
+            break;
+        default:
+            $reasonMessage = 'We cannot determine at this time why a 404 was generated.';
+            break;
+    }
+?>
+
+<p><?= $reasonMessage ?></p>
+
+<?php endif ?>
+
+<?php if (! empty($this->controller)) : ?>
+
+<dl>
+    <dt>Controller:</dt>
+    <dd><?= $this->escapeHtml($this->controller) ?>
+    <?php
+    if (! empty($this->controller_class)
+        && $this->controller_class != $this->controller
+    ) {
+        echo sprintf('(resolves to %s)', $this->escapeHtml($this->controller_class));
+    }
+    ?>
+</dd>
+</dl>
+
+<?php endif ?>
+
+<?php if (! empty($this->display_exceptions)) : ?>
+
+    <?php if (isset($this->exception)
+        && ($this->exception instanceof \Throwable || $this->exception instanceof \Exception)) : ?>
+<hr/>
+<h2>Additional information:</h2>
+<h3><?= get_class($this->exception) ?></h3>
+<dl>
+    <dt>File:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
+    </dd>
+    <dt>Message:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
+    </dd>
+    <dt>Stack trace:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getTraceAsString() ?></pre>
+    </dd>
+</dl>
+        <?php $e = $this->exception->getPrevious() ?>
+        <?php if ($e) : ?>
+<hr/>
+<h2>Previous exceptions:</h2>
+<ul class="unstyled">
+            <?php while ($e) : ?>
+    <li>
+        <h3><?= get_class($e) ?></h3>
+        <dl>
+            <dt>File:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>
+            </dd>
+            <dt>Message:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $this->escapeHtml($e->getMessage()) ?></pre>
+            </dd>
+            <dt>Stack trace:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getTraceAsString() ?></pre>
+            </dd>
+        </dl>
+    </li>
+                <?php $e = $e->getPrevious() ?>
+            <?php endwhile ?>
+</ul>
+        <?php endif ?>
+
+    <?php else : ?>
+
+<h3>No Exception available</h3>
+
+    <?php endif ?>
+
+<?php endif ?>
Index: src/webapp/apigility/module/Application/view/error/index.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/error/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/error/index.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,59 @@
+<h1>An error occurred</h1>
+<h2><?= $this->message ?></h2>
+
+<?php if (! empty($this->display_exceptions)) : ?>
+
+    <?php if (isset($this->exception)
+        && ($this->exception instanceof \Throwable || $this->exception instanceof \Exception)) : ?>
+<hr/>
+<h2>Additional information:</h2>
+<h3><?= get_class($this->exception) ?></h3>
+<dl>
+    <dt>File:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getFile() ?>:<?= $this->exception->getLine() ?></pre>
+    </dd>
+    <dt>Message:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->escapeHtml($this->exception->getMessage()) ?></pre>
+    </dd>
+    <dt>Stack trace:</dt>
+    <dd>
+        <pre class="prettyprint linenums"><?= $this->exception->getTraceAsString() ?></pre>
+    </dd>
+</dl>
+        <?php $e = $this->exception->getPrevious() ?>
+        <?php if ($e) : ?>
+<hr/>
+<h2>Previous exceptions:</h2>
+<ul class="unstyled">
+            <?php while ($e) : ?>
+    <li>
+        <h3><?= get_class($e); ?></h3>
+        <dl>
+            <dt>File:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getFile() ?>:<?= $e->getLine() ?></pre>
+            </dd>
+            <dt>Message:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $this->escapeHtml($e->getMessage()) ?></pre>
+            </dd>
+            <dt>Stack trace:</dt>
+            <dd>
+                <pre class="prettyprint linenums"><?= $e->getTraceAsString() ?></pre>
+            </dd>
+        </dl>
+    </li>
+                <?php $e = $e->getPrevious() ?>
+            <?php endwhile ?>
+</ul>
+        <?php endif ?>
+
+    <?php else : ?>
+
+<h3>No Exception available</h3>
+
+    <?php endif ?>
+
+<?php endif ?>
Index: src/webapp/apigility/module/Application/view/layout/layout.phtml
===================================================================
--- src/webapp/apigility/module/Application/view/layout/layout.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/Application/view/layout/layout.phtml	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,42 @@
+<?= $this->doctype() ?>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+<?php
+echo $this->headTitle('Apigility');
+
+echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0');
+
+echo $this->headLink(['rel' => 'icon', 'type' => 'image/png', 'href' => $this->basePath('/img/favicon.png')])
+    ->prependStylesheet($this->basePath('/zf-apigility/css/main.min.css'))
+    ->prependStylesheet($this->basePath('/zf-apigility/css/bootstrap.min.css'));
+
+echo $this->headScript()
+    ->prependFile($this->basePath('/zf-apigility/js/bootstrap.min.js'))
+    ->prependFile($this->basePath('/zf-apigility/js/jquery.min.js'));
+?>
+</head>
+<body>
+    <div class="container">
+        <?= $this->content ?>
+    </div>
+    <footer>
+        <hr>
+        <div class="container center-block"><div class="row">
+            <div class="col-sm-4">
+                &copy; Copyright 2013 - <?= date('Y') ?>
+                by <a href="http://www.zend.com">Zend Technologies</a> Ltd.
+            </div>
+
+            <div class="col-sm-4"><p class="center-block">
+                Apigility version <strong><?= \Apigility\VERSION ?></strong>
+            </p></div>
+
+            <div class="col-sm-4"><p class="pull-right">
+                For more information <a href="https://apigility.org">apigility.org</a>
+            </p></div>
+        </div></div>
+    </footer>
+    <?= $this->inlineScript() ?>
+</body>
+</html>
Index: src/webapp/apigility/module/gnuboat_mapservice/Module.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/Module.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/Module.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,23 @@
+<?php
+namespace gnuboat_mapservice;
+
+use ZF\Apigility\Provider\ApigilityProviderInterface;
+
+class Module implements ApigilityProviderInterface
+{
+    public function getConfig()
+    {
+        return include __DIR__ . '/config/module.config.php';
+    }
+
+    public function getAutoloaderConfig()
+    {
+        return [
+            'ZF\Apigility\Autoloader' => [
+                'namespaces' => [
+                    __NAMESPACE__ => __DIR__ . '/src',
+                ],
+            ],
+        ];
+    }
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/config/module.config.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/config/module.config.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/config/module.config.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,260 @@
+<?php
+return [
+    'service_manager' => [
+        'factories' => [
+            \gnuboat_mapservice\V1\Rest\Upload\UploadResource::class => \gnuboat_mapservice\V1\Rest\Upload\UploadResourceFactory::class,
+            \gnuboat_mapservice\V1\Rest\Waters\WatersResource::class => \gnuboat_mapservice\V1\Rest\Waters\WatersResourceFactory::class,
+        ],
+    ],
+    'router' => [
+        'routes' => [
+            'gnuboat_mapservice.rest.upload' => [
+                'type' => 'Segment',
+                'options' => [
+                    'route' => '/upload[/:upload_id]',
+                    'defaults' => [
+                        'controller' => 'gnuboat_mapservice\\V1\\Rest\\Upload\\Controller',
+                    ],
+                ],
+            ],
+            'gnuboat_mapservice.rest.waters' => [
+                'type' => 'Segment',
+                'options' => [
+                    'route' => '/waters[/:waters_id]',
+                    'defaults' => [
+                        'controller' => 'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller',
+                    ],
+                ],
+            ],
+        ],
+    ],
+    'zf-versioning' => [
+        'uri' => [
+            0 => 'gnuboat_mapservice.rest.upload',
+            1 => 'gnuboat_mapservice.rest.waters',
+        ],
+    ],
+    'zf-rest' => [
+        'gnuboat_mapservice\\V1\\Rest\\Upload\\Controller' => [
+            'listener' => \gnuboat_mapservice\V1\Rest\Upload\UploadResource::class,
+            'route_name' => 'gnuboat_mapservice.rest.upload',
+            'route_identifier_name' => 'upload_id',
+            'collection_name' => 'upload',
+            'entity_http_methods' => [
+                0 => 'GET',
+                1 => 'PATCH',
+                2 => 'PUT',
+                3 => 'DELETE',
+            ],
+            'collection_http_methods' => [
+                0 => 'GET',
+                1 => 'POST',
+            ],
+            'collection_query_whitelist' => [],
+            'page_size' => 25,
+            'page_size_param' => null,
+            'entity_class' => \gnuboat_mapservice\V1\Rest\Upload\UploadEntity::class,
+            'collection_class' => \gnuboat_mapservice\V1\Rest\Upload\UploadCollection::class,
+            'service_name' => 'upload',
+        ],
+        'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => [
+            'listener' => \gnuboat_mapservice\V1\Rest\Waters\WatersResource::class,
+            'route_name' => 'gnuboat_mapservice.rest.waters',
+            'route_identifier_name' => 'waters_id',
+            'collection_name' => 'waters',
+            'entity_http_methods' => [
+                0 => 'GET',
+                1 => 'PATCH',
+                2 => 'PUT',
+                3 => 'DELETE',
+            ],
+            'collection_http_methods' => [
+                0 => 'GET',
+                1 => 'POST',
+            ],
+            'collection_query_whitelist' => [
+                0 => 'label',
+            ],
+            'page_size' => 25,
+            'page_size_param' => null,
+            'entity_class' => \gnuboat_mapservice\GnuBoat\MapService\Water::class,
+            'collection_class' => 'GnuBoat\\MapService\\WaterCollection',
+            'service_name' => 'waters',
+        ],
+    ],
+    'zf-content-negotiation' => [
+        'controllers' => [
+            'gnuboat_mapservice\\V1\\Rest\\Upload\\Controller' => 'HalJson',
+            'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => 'HalJson',
+        ],
+        'accept_whitelist' => [
+            'gnuboat_mapservice\\V1\\Rest\\Upload\\Controller' => [
+                0 => 'application/vnd.gnuboat_mapservice.v1+json',
+                1 => 'application/hal+json',
+                2 => 'application/json',
+            ],
+            'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => [
+                0 => 'application/vnd.gnuboat_mapservice.v1+json',
+                1 => 'application/hal+json',
+                2 => 'application/json',
+            ],
+        ],
+        'content_type_whitelist' => [
+            'gnuboat_mapservice\\V1\\Rest\\Upload\\Controller' => [
+                0 => 'application/vnd.gnuboat_mapservice.v1+json',
+                1 => 'application/json',
+            ],
+            'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => [
+                0 => 'application/vnd.gnuboat_mapservice.v1+json',
+                1 => 'application/json',
+            ],
+        ],
+    ],
+    'zf-hal' => [
+        'metadata_map' => [
+            \gnuboat_mapservice\V1\Rest\Upload\UploadEntity::class => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.upload',
+                'route_identifier_name' => 'upload_id',
+                'hydrator' => \Zend\Hydrator\ArraySerializable::class,
+            ],
+            \gnuboat_mapservice\V1\Rest\Upload\UploadCollection::class => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.upload',
+                'route_identifier_name' => 'upload_id',
+                'is_collection' => true,
+            ],
+            'gnuboat_mapservice\\V1\\Rest\\Waters\\WatersEntity' => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'hydrator' => \Zend\Hydrator\ArraySerializable::class,
+            ],
+            'gnuboat_mapservice\\V1\\Rest\\Waters\\WatersCollection' => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'is_collection' => true,
+            ],
+            \gnuboat_mapservice\GnuBoat\MapService\Water::class => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'hydrator' => \Zend\Hydrator\Reflection::class,
+            ],
+            \gnuboat_mapservice\GnuBoat\MapService\WaterCollection::class => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'is_collection' => true,
+            ],
+            'gnuboat_mapservice\\src\\GnuBoat\\MapService\\Water' => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'hydrator' => \Zend\Hydrator\Reflection::class,
+            ],
+            'gnuboat_mapservice\\src\\GnuBoat\\MapService\\WaterCollection' => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'is_collection' => true,
+            ],
+            'GnuBoat\\MapService\\Water' => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'hydrator' => \Zend\Hydrator\Reflection::class,
+            ],
+            'GnuBoat\\MapService\\WaterCollection' => [
+                'entity_identifier_name' => 'id',
+                'route_name' => 'gnuboat_mapservice.rest.waters',
+                'route_identifier_name' => 'waters_id',
+                'is_collection' => true,
+            ],
+        ],
+    ],
+    'zf-content-validation' => [
+        'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => [
+            'input_filter' => 'gnuboat_mapservice\\V1\\Rest\\Waters\\Validator',
+        ],
+    ],
+    'input_filter_specs' => [
+        'gnuboat_mapservice\\V1\\Rest\\Waters\\Validator' => [
+            0 => [
+                'required' => false,
+                'validators' => [
+                    0 => [
+                        'name' => \Zend\Validator\Digits::class,
+                        'options' => [],
+                    ],
+                ],
+                'filters' => [],
+                'name' => 'id',
+                'description' => 'Unique Identifier',
+                'field_type' => 'int',
+                'error_message' => 'The identifier of a water must be an integer.',
+            ],
+            1 => [
+                'required' => true,
+                'validators' => [],
+                'filters' => [
+                    0 => [
+                        'name' => \Zend\Filter\StringTrim::class,
+                        'options' => [],
+                    ],
+                ],
+                'name' => 'label',
+                'description' => 'Label of the water',
+                'error_message' => 'You must enter a Water name',
+            ],
+            2 => [
+                'required' => false,
+                'validators' => [
+                    0 => [
+                        'name' => \Zend\Validator\Digits::class,
+                        'options' => [],
+                    ],
+                ],
+                'filters' => [],
+                'name' => 'osm_id',
+                'description' => 'OpenStreetMap Id of the object',
+                'allow_empty' => true,
+            ],
+            3 => [
+                'required' => false,
+                'validators' => [],
+                'filters' => [
+                    0 => [
+                        'name' => \Zend\Filter\StringTrim::class,
+                        'options' => [],
+                    ],
+                ],
+                'name' => 'osm_type',
+                'description' => 'OpenStreetMap type of the object',
+                'field_type' => 'string',
+                'allow_empty' => true,
+            ],
+        ],
+    ],
+    'zf-mvc-auth' => [
+        'authorization' => [
+            'gnuboat_mapservice\\V1\\Rest\\Waters\\Controller' => [
+                'collection' => [
+                    'GET' => false,
+                    'POST' => true,
+                    'PUT' => false,
+                    'PATCH' => false,
+                    'DELETE' => false,
+                ],
+                'entity' => [
+                    'GET' => false,
+                    'POST' => false,
+                    'PUT' => true,
+                    'PATCH' => true,
+                    'DELETE' => true,
+                ],
+            ],
+        ],
+    ],
+];
Index: src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/Water.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/Water.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/Water.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,37 @@
+<?php
+/*
+    Copyright (C) 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace gnuboat_mapservice\GnuBoat\MapService;
+
+class Water
+{
+	public $waterId;
+	public $label;
+	public $osmId;
+	public $osmType;
+	public $osmClass;
+	
+	public function __construct(int $id, string $label, int $osm_id, string $osm_type, string $osm_class)
+	{
+		$this->waterId = $id;
+		$this->label = $label;
+		$this->osmId = $osm_id;
+		$this->osmType = $osm_type;
+		$this->osmClass = $osm_class;
+	}
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/WaterCollection.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/WaterCollection.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/WaterCollection.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,30 @@
+<?php
+/*
+    Copyright (C) 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace gnuboat_mapservice\GnuBoat\MapService;
+
+use Zend\Paginator\Paginator;
+use Zend\Paginator\Adapter;
+
+class WaterCollection extends Paginator
+{
+	public function __construct($waters, $waterHydrator)
+	{
+		parent::__construct(new Adapter\ArrayAdapter($waters));
+	}
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/WaterMapper.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/WaterMapper.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/GnuBoat/MapService/WaterMapper.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,129 @@
+<?php
+/*
+    Copyright (C) 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace gnuboat_mapservice\GnuBoat\MapService;
+
+use Zend\Db\Sql as Sql;
+use Zend\Db\Sql\Where;
+use Zend\Db\Sql\Predicate\Like;
+use Zend\Db\Adapter\Driver\ResultInterface;
+use Zend\Db\ResultSet\HydratingResultSet;
+use ReflectionClass;
+use ZF\ApiProblem\ApiProblem;
+
+use gnuboat_mapservice\GnuBoat\MapService\WaterCollection as WaterCollection;
+
+class WaterMapper
+{
+	protected $database_adapter;
+	protected $hydrator;
+	
+	public function __construct($hydrator, $database_adapter)
+	{
+		$this->hydrator = $hydrator;
+		$this->database_adapter = $database_adapter;
+	}
+	
+	public function store($water)
+	{
+		$waters = $this->fetchByLabel($water->label);
+		if($waters){
+			if($waters->count() == 1){
+				return $this->hydrator->extract($waters->current());
+			}
+			elseif($waters->count() > 1){
+				/*return new ApiProblem(901, new WaterCollection($waters, $this->hydrator))*/;
+				return new ApiProblem(901, "Need to return found waters here!");
+			}
+		}
+		
+		$sql = new Sql\Sql($this->database_adapter);
+		$insert = $sql->insert("waters");
+		$insert->columns(['label', 'osm_id', 'osm_type']);
+		$insert->values([$water->label, $water->osmId, $water->osmType]);
+		$statement = $sql->getSqlStringForSqlObject($insert);
+		$results = $this->database_adapter->query($statement)->execute();
+
+		$waters = $this->fetchByLabel($water->label);
+		if($waters->count() < 1)
+			return new ApiProblem(500, "Should not happen in ". __CLASS__ .".". __METHOD__);
+		return $this->hydrator->extract($waters->current());
+	}
+	
+	public function fetch($params)
+	{
+		$sql = new Sql\Sql($this->database_adapter);
+		$select = $sql->select('waters');
+		
+		$where = new Where();
+		if(isset($params['label']) )
+			$where->like('label', '%'. $params['label'] .'%');
+		$select->where($where);
+		
+		$sqlQuery = $sql->getSqlStringForSqlObject($select);
+		$statement = $this->database_adapter->createStatement($sqlQuery);
+		$statement->prepare();
+		$results = $statement->execute();
+		$waters = $this->watersFromResult($results);
+		if(!$waters)
+			return new ApiProblem(500, "Could not fetch waters");
+		return new WaterCollection($waters->toArray(), $this->hydrator);
+	}
+	
+	public function fetchById($id)
+	{
+		$sql = new Sql\Sql($this->database_adapter);
+		$select = $sql->select('waters');
+		$select->where(['water_id' => $id]);
+		$sqlQuery = $sql->getSqlStringForSqlObject($select);
+		$statement = $this->database_adapter->createStatement($sqlQuery);
+		$statement->prepare();
+		$results = $statement->execute();
+		$waters = $this->watersFromResult($results);
+		if(!$waters || $waters->count() != 1)
+			return new ApiProblem(404, "Requested water not found");
+		return $this->hydrator->extract($waters->current());
+	}
+	
+	private function fetchByLabel($label)
+	{
+		$sql = new Sql\Sql($this->database_adapter);
+		$select = $sql->select('waters');
+		$select->where(['label' => $label]);
+		$statement = $sql->getSqlStringForSqlObject($select);
+		$results = $this->database_adapter->query($statement)->execute();
+		if($results->count() < 1)
+			return array();
+		return $this->watersFromResult($results);
+	}
+	
+	private function watersFromResult($dbResult)
+	{
+		if(!($dbResult instanceof ResultInterface)){
+			error_log("No instance of ResultInterface in ". __CLASS__ .".". __METHOD__);
+			return False;
+		}
+		if(!$dbResult->isQueryResult()){
+			error_log("No query result in ". __CLASS__ .".". __METHOD__);
+			return False;
+		}
+		$waters = new HydratingResultSet($this->hydrator, (new ReflectionClass(Water::class))->newInstanceWithoutConstructor());
+		$waters->initialize($dbResult);
+		return $waters;
+	}
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadCollection.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadCollection.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadCollection.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,8 @@
+<?php
+namespace gnuboat_mapservice\V1\Rest\Upload;
+
+use Zend\Paginator\Paginator;
+
+class UploadCollection extends Paginator
+{
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadEntity.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadEntity.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadEntity.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,6 @@
+<?php
+namespace gnuboat_mapservice\V1\Rest\Upload;
+
+class UploadEntity
+{
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadResource.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadResource.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadResource.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,109 @@
+<?php
+namespace gnuboat_mapservice\V1\Rest\Upload;
+
+use ZF\ApiProblem\ApiProblem;
+use ZF\Rest\AbstractResourceListener;
+
+class UploadResource extends AbstractResourceListener
+{
+    /**
+     * Create a resource
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function create($data)
+    {
+        return new ApiProblem(405, 'The POST method has not been defined');
+    }
+
+    /**
+     * Delete a resource
+     *
+     * @param  mixed $id
+     * @return ApiProblem|mixed
+     */
+    public function delete($id)
+    {
+        return new ApiProblem(405, 'The DELETE method has not been defined for individual resources');
+    }
+
+    /**
+     * Delete a collection, or members of a collection
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function deleteList($data)
+    {
+        return new ApiProblem(405, 'The DELETE method has not been defined for collections');
+    }
+
+    /**
+     * Fetch a resource
+     *
+     * @param  mixed $id
+     * @return ApiProblem|mixed
+     */
+    public function fetch($id)
+    {
+        return new ApiProblem(405, 'The GET method has not been defined for individual resources');
+    }
+
+    /**
+     * Fetch all or a subset of resources
+     *
+     * @param  array $params
+     * @return ApiProblem|mixed
+     */
+    public function fetchAll($params = [])
+    {
+        return new ApiProblem(405, 'The GET method has not been defined for collections');
+    }
+
+    /**
+     * Patch (partial in-place update) a resource
+     *
+     * @param  mixed $id
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function patch($id, $data)
+    {
+        return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');
+    }
+
+    /**
+     * Patch (partial in-place update) a collection or members of a collection
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function patchList($data)
+    {
+        return new ApiProblem(405, 'The PATCH method has not been defined for collections');
+    }
+
+    /**
+     * Replace a collection or members of a collection
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function replaceList($data)
+    {
+        return new ApiProblem(405, 'The PUT method has not been defined for collections');
+    }
+
+    /**
+     * Update a resource
+     *
+     * @param  mixed $id
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function update($id, $data)
+    {
+        return new ApiProblem(405, 'The PUT method has not been defined for individual resources');
+    }
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadResourceFactory.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadResourceFactory.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Upload/UploadResourceFactory.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,10 @@
+<?php
+namespace gnuboat_mapservice\V1\Rest\Upload;
+
+class UploadResourceFactory
+{
+    public function __invoke($services)
+    {
+        return new UploadResource();
+    }
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Waters/WatersResource.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Waters/WatersResource.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Waters/WatersResource.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,146 @@
+<?php
+/*
+    Copyright (C) 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace gnuboat_mapservice\V1\Rest\Waters;
+
+use ZF\ApiProblem\ApiProblem;
+use ZF\Rest\AbstractResourceListener;
+use ReflectionClass;
+
+use gnuboat_mapservice\GnuBoat\MapService\Water as Water;
+use gnuboat_mapservice\GnuBoat\MapService\WaterCollection as WaterCollection;
+use gnuboat_mapservice\GnuBoat\MapService\WaterMapper as WaterMapper;
+
+class WatersResource extends AbstractResourceListener
+{
+	protected $hydrator;
+	protected $database_adapter;
+	protected $identity;
+	protected $mapperWater;
+
+	public function __construct($hydrator, $database_adapter, $identity)
+	{
+		$this->hydrator = $hydrator;
+		$this->database_adapter = $database_adapter;
+		$this->identity = $identity;
+		
+		$this->mapperWater = new WaterMapper($hydrator, $database_adapter);
+	}
+
+    /**
+     * Create a resource
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function create($data)
+    {
+		return $this->mapperWater->store($this->hydrator->hydrate(get_object_vars($data), (new ReflectionClass(Water::class))->newInstanceWithoutConstructor()));
+    }
+
+    /**
+     * Delete a resource
+     *
+     * @param  mixed $id
+     * @return ApiProblem|mixed
+     */
+    public function delete($id)
+    {
+        return new ApiProblem(405, 'The DELETE method has not been defined for individual resources');
+    }
+
+    /**
+     * Delete a collection, or members of a collection
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function deleteList($data)
+    {
+        return new ApiProblem(405, 'The DELETE method has not been defined for collections');
+    }
+
+    /**
+     * Fetch a resource
+     *
+     * @param  mixed $id
+     * @return ApiProblem|mixed
+     */
+    public function fetch($id)
+    {
+		return $this->mapperWater->fetchById($id);
+    }
+
+    /**
+     * Fetch all or a subset of resources
+     *
+     * @param  array $params
+     * @return ApiProblem|mixed
+     */
+    public function fetchAll($params = [])
+    {
+		error_log(print_r($params, True));
+		return $this->mapperWater->fetch($params);
+    }
+
+    /**
+     * Patch (partial in-place update) a resource
+     *
+     * @param  mixed $id
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function patch($id, $data)
+    {
+        return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');
+    }
+
+    /**
+     * Patch (partial in-place update) a collection or members of a collection
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function patchList($data)
+    {
+        return new ApiProblem(405, 'The PATCH method has not been defined for collections');
+    }
+
+    /**
+     * Replace a collection or members of a collection
+     *
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function replaceList($data)
+    {
+        return new ApiProblem(405, 'The PUT method has not been defined for collections');
+    }
+
+    /**
+     * Update a resource
+     *
+     * @param  mixed $id
+     * @param  mixed $data
+     * @return ApiProblem|mixed
+     */
+    public function update($id, $data)
+    {
+        return new ApiProblem(405, 'The PUT method has not been defined for individual resources');
+    }
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Waters/WatersResourceFactory.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Waters/WatersResourceFactory.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/src/V1/Rest/Waters/WatersResourceFactory.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,40 @@
+<?php
+/*
+    Copyright (C) 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace gnuboat_mapservice\V1\Rest\Waters;
+
+use Zend\Hydrator\Reflection as ReflectionHydrator;
+use Zend\Hydrator\NamingStrategy\UnderscoreNamingStrategy as UnderscoreNamingStrategy;
+
+use Zend\Db\Adapter\AdapterInterface;
+
+class WatersResourceFactory
+{
+    public function __invoke($services)
+    {
+		$hydrator = new ReflectionHydrator();
+		// converts camelCase names into camel_case names and vice versa
+		$hydrator->setNamingStrategy(new UnderscoreNamingStrategy());
+    
+		$adapter = $services->get('gnuboat_mapservice_db');
+		
+		$identity = $services->get('api-identity');
+
+        return new WatersResource($hydrator, $adapter, $identity);
+    }
+}
Index: src/webapp/apigility/module/gnuboat_mapservice/test/V1/Rest/WatersTest.php
===================================================================
--- src/webapp/apigility/module/gnuboat_mapservice/test/V1/Rest/WatersTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
+++ src/webapp/apigility/module/gnuboat_mapservice/test/V1/Rest/WatersTest.php	(revision 74c3571b330568daeee1f4562299f3daae280ddf)
@@ -0,0 +1,96 @@
+<?php
+/*
+    Copyright (C) 2019 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+namespace gnuboat_mapservice\Test\V1\Rest;
+
+//  enable in php 7
+// declare(Strict_types=1);
+use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
+use Zend\Stdlib\ArrayUtils;
+use Zend\Http\Request;
+use Zend\Http\Headers;
+
+// use ApplicationTest\Bootstrap;
+use Zend\Mvc\Router\Http\TreeRouteStack as HttpRouter;
+use Application\Controller\IndexController;
+use Zend\Http\Request;
+use Zend\Http\Response;
+use Zend\Mvc\MvcEvent;
+use Zend\Mvc\Router\RouteMatch;
+use PHPUnit_Framework_TestCase;
+
+/**
+* @brief Covers Parser.php
+*/
+final class WatersTest extends AbstractHttpControllerTestCase
+{
+	protected $traceError = true;
+	
+	protected $controller;
+    protected $request;
+    protected $response;
+    protected $routeMatch;
+    protected $event;
+
+	public function setUp()
+    {
+// 		$configOverrides = [
+// 			'module_listener_options' => [
+// 				'config_cache_enabled' => false,
+// 			],
+// 		];
+// 
+// 		$this->setApplicationConfig(ArrayUtils::merge(
+// 			include __DIR__ . '/../../../../../config/application.config.php',
+// 			$configOverrides
+// 		));
+// 
+// 		parent::setUp();
+
+// 		$serviceManager = Bootstrap::getServiceManager();
+        $this->controller = new IndexController();
+        $this->request    = new Request();
+        $this->routeMatch = new RouteMatch(array('controller' => 'index'));
+        $this->event      = new MvcEvent();
+        $config = $serviceManager->get('Config');
+        $routerConfig = isset($config['router']) ? $config['router'] : array();
+        $router = HttpRouter::factory($routerConfig);
+
+        $this->event->setRouter($router);
+        $this->event->setRouteMatch($this->routeMatch);
+        $this->controller->setEvent($this->event);
+        $this->controller->setServiceLocator($serviceManager);
+	}
+
+    public function testWatersById()
+    {
+// 		$this->request = new \Zend\Http\Request();
+// 		$headers = new \Zend\Http\Headers;
+// 		$headers->addHeaderLine('Accept', 'application/json');
+// // 		$this->request->setHeaders($headers);
+//         $this->dispatch('/waters/1');
+//         $this->assertResponseStatusCode(200);
+// 
+//         $this->assertModuleName('application');
+//         $this->assertControllerName('application_index');
+//         $this->assertControllerClass('IndexController');
+//         $this->assertMatchedRouteName('home');
+    }
+}
+
+?>
