<p>As far as splitting up the tests, you are going to run into a situation where helper files are needed for the common test code or the parent unti test fixture and navigating the tests to understand what is going on is even harder to read (I went down this path initially).</p>
<p>The reality is that this test code is complicated and has a ton of embedded/shared code because the module was extremely hard to test in the current state. The goal of this first patch was to get everything fully tested in the "best" way possible, so the future work could refactor it into something much easier to work with. The version of the tests after (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="520323046" data-permission-text="Issue title is private" data-url="https://github.com/bisq-network/bisq/issues/3584" data-hovercard-type="pull_request" data-hovercard-url="/bisq-network/bisq/pull/3584/hovercard" href="https://github.com/bisq-network/bisq/pull/3584">#3584</a>) are much cleaner after the unit tests of ProtectedStorageEntry and ProtectedMailboxStorageEntry could be unit tested.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3554?email_source=notifications&email_token=AJFFTNVE6VFC6WOOUME4YT3QS3KN3A5CNFSM4JIXNDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUIXQA#issuecomment-552111040">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNWWEVD6W4GQQYIJM4LQS3KN3ANCNFSM4JIXNDRQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNX7DI7LPTKVJPAVNK3QS3KN3A5CNFSM4JIXNDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUIXQA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3554?email_source=notifications\u0026email_token=AJFFTNVE6VFC6WOOUME4YT3QS3KN3A5CNFSM4JIXNDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUIXQA#issuecomment-552111040",
"url": "https://github.com/bisq-network/bisq/pull/3554?email_source=notifications\u0026email_token=AJFFTNVE6VFC6WOOUME4YT3QS3KN3A5CNFSM4JIXNDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUIXQA#issuecomment-552111040",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>