+
+func TestValidateAlreadyOnboarded(t *testing.T) {
+ publicKey := "publicKey"
+ invokerUnderTest := APIInvokerEnrolmentDetails{
+ OnboardingInformation: OnboardingInformation{
+ ApiInvokerPublicKey: publicKey,
+ },
+ }
+
+ otherInvoker := APIInvokerEnrolmentDetails{
+ OnboardingInformation: OnboardingInformation{
+ ApiInvokerPublicKey: "otherPublicKey",
+ },
+ }
+ assert.Nil(t, invokerUnderTest.ValidateAlreadyOnboarded(otherInvoker))
+
+ otherInvoker.OnboardingInformation.ApiInvokerPublicKey = publicKey
+ assert.NotNil(t, invokerUnderTest.ValidateAlreadyOnboarded(otherInvoker))
+}