1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.fit.core.wa;
20
21 import static org.junit.jupiter.api.Assertions.assertTrue;
22
23 import org.apache.syncope.common.lib.wa.ImpersonationAccount;
24 import org.apache.syncope.fit.AbstractITCase;
25 import org.junit.jupiter.api.Test;
26
27 public class ImpersonationITCase extends AbstractITCase {
28
29 @Test
30 public void createAndFind() {
31 String owner = getUUIDString();
32 ImpersonationAccount account = new ImpersonationAccount.Builder().impersonated(getUUIDString()).build();
33
34 IMPERSONATION_SERVICE.create(owner, account);
35
36 assertTrue(IMPERSONATION_SERVICE.read(owner).contains(account));
37
38 IMPERSONATION_SERVICE.delete(owner, account.getImpersonated());
39
40 assertTrue(IMPERSONATION_SERVICE.read(owner).isEmpty());
41 }
42 }