Search in sources :

Example 1 with CustomSid

use of org.springframework.security.acls.sid.CustomSid in project spring-security by spring-projects.

the class JdbcMutableAclServiceTests method testProcessingCustomSid.

@Test
public void testProcessingCustomSid() {
    CustomJdbcMutableAclService customJdbcMutableAclService = spy(new CustomJdbcMutableAclService(dataSource, lookupStrategy, aclCache));
    CustomSid customSid = new CustomSid("Custom sid");
    when(customJdbcMutableAclService.createOrRetrieveSidPrimaryKey("Custom sid", false, false)).thenReturn(1L);
    Long result = customJdbcMutableAclService.createOrRetrieveSidPrimaryKey(customSid, false);
    assertThat(new Long(1L)).isEqualTo(result);
}
Also used : CustomSid(org.springframework.security.acls.sid.CustomSid) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CustomSid (org.springframework.security.acls.sid.CustomSid)1