diff --git a/tests/Controller/Api/test.pdf b/tests/Controller/Api/test.pdf
index 4a7256a..aa20ff1 100644
--- a/tests/Controller/Api/test.pdf
+++ b/tests/Controller/Api/test.pdf
@@ -1,76 +1,116 @@
-%PDF-1.5
-%µí®û
-3 0 obj
-<< /Length 4 0 R
-   /Filter /FlateDecode
->>
-stream
-xœmPËjÄ0¼û+æœX²å”
-½·`è9
-›…BC“ìÿSy“@‹i¥ÑØ‹yÇb\Ç‘S()ŽJTâ)Å°^Ñ×ÍøˆìÂ6Å‚õ‚é>ýàâ³YÐ¿
-·Ûe1nèÛ8Ÿb”u ˜¶…]ÍðÌhL°‘N5uFê¨Y”Â$II–œ9ü±øRMÈpz4‘úâ$÷I´«~›~²Î:êdžœs¤`…W…(âQKG-+Êsý2¯uÿª»ü¿•´×4IŒ]&F{Âƒ•Ã±¦I|<åÍ/ÎUe
-endstream
-endobj
-4 0 obj
-   224
-endobj
-2 0 obj
-<<
-   /ExtGState <<
-      /a0 << /CA 1 /ca 1 >>
-   >>
-   /Pattern << /p5 5 0 R >>
-   /Font <<
-      /f-0-0 6 0 R
-   >>
->>
-endobj
-7 0 obj
-<< /Type /Page
-   /Parent 1 0 R
-   /MediaBox [ 0 0 595 841 ]
-   /Contents 3 0 R
-   /Group <<
-      /Type /Group
-      /S /Transparency
-      /CS /DeviceRGB
-   >>
-   /Resources 2 0 R
->>
-endobj
-9 0 obj
-<< /Length 10 0 R
-   /Filter /FlateDecode
-   /Type /XObject
-   /Subtype /Image
-   /Width 565
-   /Height 532
-   /ColorSpace /DeviceGray
-   /BitsPerComponent 8
->>
-stream
-xœíÝg`TÅà³©$t’ÐbB/RB•""Ò»€¨x	ýZP@PE”&R¤Di"A@/Hï„ŠÔJ!m³¹	H`“ìî™™÷œ9ßó[6ûÍ¼îœ2EQ´Ä¹dß Á#?ïVÓýMˆ8y–èÔiûºÓIÜ
-ýß¶ÖÎèïD4¬TÙFÝ^ŒKJçÞ¶éýZV+žýíˆÖöê4ãêù¤ŒÄŸÝüÝçÝjåBO¢	Îî~ín<~2É’abžŠ8¾sz6Wô7&P~¥Í›wþŠ
-qyæjÊhUã%wôw'ây7ïöí´#§ì‰KÚÑêäš©Ã«çFWADqÍ×jÒ÷¡Ñvý¾X~üïõ_µñótCWD¸*X­ñŒ£{UçåKlô™eýè7GR^~çJŒa˜g6OÞ½N!t…„)ŸjNœ3s	Ì·OïÙ0¡{%t©„W¿®}¸Ë5/iœmá‚®˜¨S®Gïe¡¢òòØýùÙÑUG™JõØ¸ä¢ØÀ<öm~tíÄ¹+}¸ü¶ú›jýRI1¡[€Ø)GÓÕwQyäÒGè& öq}eS442)fE7±]öú¿ŸE'&ÅÝ¢4Dé„GûMÂn®³p º1ˆM:ˆBgå™;_Ð½·æyô›»_²nG	¡4-ÇÇÐyÑå²èf!ó³«Îô@·É@éV Ó‘¡‰ôxX‹J
-:ˆNFfö6¢{o­yyÄat,²pýut‘tüzÜCg"k·Þ¥{oíÈ=ØÑ™ábÅ®(…n*ò˜kµåè4Øl×[èÖ")*‡AGÁÑ£Ð
-F”žWÑ9°98ºÉŒ®à<tìfYXÝj†æû¾žF¦§.t¤]K`ZEw¿ƒ"·¾Â¿uLô(ñEž£44ýÁ>–øe¾ÌÄäâœÍ·pé¦
-Û|<`Èì™36<vçîôÍó`E×âÌÿ¶Nlõ¸
-‰q£R—OÍ¦¶œ]=
-È_´\…Æm[ô¼hÁŠ{w_Nˆ3›³ZmlÞ4©Š·oâª¾É½‹Šßûo’9Ý,5«¢ü»õ7iþª
-‡î»wË‘‰ÐW¶¶÷3Ø]\öÁ×õ&oQW¯ü4®[ßFÙ_~þì‡;­Õõ_,!êÜ·í´/SÑ%ê·Û—wÏ™27°^¡ìOî”*]·˜Ó-"ßìãPõÙ&²šý|jq¯ÊÙ”É­µ†oš“nŸØ0¿× Àzå_øâc“âÓ]olwä‚´øl†Û<85ºº—¶Õ	:ˆ]ÿ–ÑütXÓ×Ê½ä™ÑW‘|ß”¶ËØ?´Gãï}Íà’ª:Dû
-ÌeÛfªÅÅÄ_úgù½š/çÕÿ²®?'ÿƒÄ´?6§«ÙW¾GŸ;ìK0ošÐ¬€ÄuŠüÍ¾Íu-æÂÖåÁÚ½UÚæ+ÚRþaBâ³_›‹
-í)¿ÚÚ¸¿Ž*—e¾™jÌ§Íìt=æ¯¹u®P,·½—Õo¤ü{‹9þéÝwD3Ûÿõküf
-I|3Uü·V³•åöÖO^övx¿¢n	?åÙ¥Í½Ž6þÓ|#8¿Ï—ôfj*ßVËÚÕUëª+alê'%&>¹´‰ýÀ¦Xä7þåÉx3å‰½×]ß¹šê_p·_Ÿ|œåÉâ¸Ol¸
-m)æjN¾›©Žœ.mðð\H÷"Lþô=öôC-©?6	ÁY}2»zY“ëf*ÏVa
-—^Âï:ø1+£^š»æ'×ÃS3ß˜é=Ht3ÕEhÃ=õÛ”:E˜ÖÑÓÊY˜Ù‰@¬èeMš›)·ŸD7]²°
-ýØO|™bå­ôÊè¿æò@ÏRÜL5¾ZèÜ^Eyî9¬ÝýVØúÌí^Öô3•Sì«móÝ9ì®cžSÊÚ)d;‹YûO9>Ð³Þo¦"¶Uèì…xNþ~óÁs1åŠxÏ‹;ãs —5óúôyì«ÉIùFT+Åm™Ñ„û‘¬ýåcÏ?8ñ@Ï®”—w‹°çd*)æjðöžÏš‹8 Ò4Ëjï¤%èž
-â¯NéœOg³ŠMÎÊHMö÷À:¢®ûòìxñï[’n¾ýì¿ù@Ï¡[;•õÐÑe±›âw™w›Ä„
-­Àþî:cå¬×ððé‹(Ñôl±êóW
-l#5œ\”þ,{ž%áÜþé
-D/jaõ˜²Øá/ÀÅ?Ð³…%éÚÚ¯Zzéà%ƒÉM)x‚S+Ü<~`ÍÐ.µ|T¯BrÀ§Ö¿ÒÚ2¸z61‡.mTÄ]ã+‹ÝLNÙï—®oš9t`µb"‡¤ôœZÿf×†µÃ=Ð³Môå½Jjù†Êä¢ädºÏkbÜê¥Ãº”Ïp¸(ùvYÿ‚	ÿ²,—Ä¤SË†ÖÓìvp®ÎJSV¥Þ=½åCÞ-ç¦‘wq¯°*ãþá)]¼Ý´x…ã¢({Õ×·{äˆ	ƒ¼V(ºœ´LíµuWm?Ëý#ÓÚA\f*ù‚«­š›Ï‡‘—¶Õ­SWSOÂ\ó¬4búâý·˜uŒ%~oH¿W4òÛý˜SrhŸqgý´Üš¹Ð7åõö/ûêûŸÏZ³ëh|Ã~Ã»¾ûËfžšyòç¬¸uð°¯+#û×CýGLJÎµ›¿3 d×ž3·n³í-Íˆ¿÷çØ6¥ÑMýHòMGJˆŽžZþNßäœ·@…ú|9÷Ñðˆ‡I;Oˆ½DóÎ©þðWTN&¥Ã}»¿üÉAžÀûi“sžÂeª7ï1cÙî¢ã9tŽ¦…mþ°†r 2™”fvo^txd>Ô÷u©X÷w>˜¶rÇ±ˆ›Òÿ®d(:bÕ73˜‡(€I©mß“Œè“Ã«ÿ=s,Ö¥ß ³÷]»)ÿ(”5‹%ê÷Nâ»!U¹Óv|Õã;{ˆ½€ÏY TÅ&&Ì_²+"ž¢òœã¾"»"²ûmþŽ·6g¾vˆ!S¡
-õ;w=mÛÁ›74þ’çNEQÝ‘žÏvÛ¾_â†uËf¶pˆ©Rßï8wõ®ÅB¿-™/ªCÒñ°m£CË[	}S=ŒscËâ\‘½òD7þ_^8ô]Áº
-®ãßÞrøFlÇ<R*4«oeÞÛ^ü×ª'p)¾-ß9ÙgñCslz#a×1iÐèd«{oïœ™ÏØóæ|ôüë5¹æ0œÙ«í‹›ßEYGÖŽ„‹¾öÍøÈ™uao–ÜGÒƒ›E·Ú7&%$ƒ/rïÀ¸ŠÀ
-0
-hú¼x­Ù,v|êiýŠ&r[=n[9Ø¤‰ƒs{Œ).Pdßä\eå+$ÜXY<k3Ç
-á
-¯k«EÎígåììV>¹ª=/PIÒµwOá¦ÂÇ9%®éŒ›¡ñŒµ0“ŒY‚„uMŽ1Ïýí#[ib³É|ˆmÿtíˆ°ÿÕë§Ÿ#¹n”~dRTÒËvšaé,¨kr¯Ló!zmP~A7K¦~Â÷ŠÔ½Íbæ™›ú<û¡ùãOøäög¼v[_§ÎyÛcRžµ2v Ã§pQ9Ë÷îä_éš©á^›\SÈŸ³Ãl¹VEŠq)€Ç˜¼Ï¤ü©cqûÆd$o;ƒLuÐ5ß$%™Chjs‡Tèæ×§yü_¾ù`JîÅ¹¦£›_Ÿ"jqïš¦Šjô‡Öö¦'YûÝs@QèÖ×©ýðW†0.óÐ¯WÑï û¦È±¬›‡Xµ^‹·5Bkxg_K
\ No newline at end of file
+<?php
+/**
+ * Jingga
+ *
+ * PHP Version 8.1
+ *
+ * @package   tests
+ * @copyright Dennis Eichhorn
+ * @license   OMS License 2.0
+ * @version   1.0.0
+ * @link      https://jingga.app
+ */
+declare(strict_types=1);
+
+namespace Modules\ContractManagement\tests\Controller;
+
+use Model\CoreSettings;
+use Modules\Admin\Models\AccountPermission;
+use Modules\ContractManagement\tests\Controller\Api\ApiControllerAttributeTrait;
+use Modules\ContractManagement\tests\Controller\Api\ApiControllerContractTrait;
+use Modules\ContractManagement\tests\Controller\Api\ApiControllerContractTypeTrait;
+use phpOMS\Account\Account;
+use phpOMS\Account\AccountManager;
+use phpOMS\Account\PermissionType;
+use phpOMS\Application\ApplicationAbstract;
+use phpOMS\DataStorage\Session\HttpSession;
+use phpOMS\Dispatcher\Dispatcher;
+use phpOMS\Event\EventManager;
+use phpOMS\Localization\L11nManager;
+use phpOMS\Module\ModuleAbstract;
+use phpOMS\Module\ModuleManager;
+use phpOMS\Router\WebRouter;
+use phpOMS\Utils\TestUtils;
+
+/**
+ * @testdox Modules\ContractManagement\tests\Controller\ApiControllerTest: ContractManagement api controller
+ *
+ * @internal
+ */
+final class ApiControllerTest extends \PHPUnit\Framework\TestCase
+{
+    protected ApplicationAbstract $app;
+
+    /**
+     * @var \Modules\ContractManagement\Controller\ApiController
+     */
+    protected ModuleAbstract $module;
+
+    protected ModuleAbstract $attrModule;
+
+    protected ModuleAbstract $typeModule;
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function setUp() : void
+    {
+        $this->app = new class() extends ApplicationAbstract
+        {
+            protected string $appName = 'Api';
+        };
+
+        $this->app->dbPool          = $GLOBALS['dbpool'];
+        $this->app->unitId          = 1;
+        $this->app->accountManager  = new AccountManager($GLOBALS['session']);
+        $this->app->appSettings     = new CoreSettings();
+        $this->app->moduleManager   = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/');
+        $this->app->dispatcher      = new Dispatcher($this->app);
+        $this->app->eventManager    = new EventManager($this->app->dispatcher);
+        $this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php');
+        $this->app->sessionManager = new HttpSession(36000);
+        $this->app->l11nManager    = new L11nManager();
+
+        $account = new Account();
+        TestUtils::setMember($account, 'id', 1);
+
+        $permission       = new AccountPermission();
+        $permission->unit = 1;
+        $permission->app  = 2;
+        $permission->setPermission(
+            PermissionType::READ
+            | PermissionType::CREATE
+            | PermissionType::MODIFY
+            | PermissionType::DELETE
+            | PermissionType::PERMISSION
+        );
+
+        $account->addPermission($permission);
+
+        $this->app->accountManager->add($account);
+        $this->app->router = new WebRouter();
+
+        $this->module     = $this->app->moduleManager->get('ContractManagement', 'Api');
+        $this->attrModule = $this->app->moduleManager->get('ContractManagement', 'ApiAttribute');
+        $this->typeModule = $this->app->moduleManager->get('ContractManagement', 'ApiContractType');
+
+        TestUtils::setMember($this->module, 'app', $this->app);
+        TestUtils::setMember($this->attrModule, 'app', $this->app);
+        TestUtils::setMember($this->typeModule, 'app', $this->app);
+    }
+
+    use ApiControllerContractTypeTrait;
+    use ApiControllerContractTrait;
+    use ApiControllerAttributeTrait;
+    }
+
+    public function testInvalidapiContractDelete() : void
+    {
+        $response = new HttpResponse();
+        $request  = new HttpRequest(new HttpUri(''));
+
+        $request->header->account = 1;
+        $this->module->apiContractDelete($request, $response);
+        self::assertEquals(RequestStatusCode::R_400, $response->header->status);
+    }
+}
