@Test
public void testAsStructZTSPolicy() {

    List<com.yahoo.athenz.zts.Policy> policies = new ArrayList<>();
    com.yahoo.athenz.zts.Policy mPolicy = Mockito.mock(com.yahoo.athenz.zts.Policy.class);
    policies.add(mPolicy);
    
    List<com.yahoo.athenz.zts.Assertion> assertions = new ArrayList<>();
    com.yahoo.athenz.zts.Assertion mAssertion = Mockito.mock(com.yahoo.athenz.zts.Assertion.class);
    assertions.add(mAssertion);
    
    Mockito.when(mockPolicy.getPolicies()).thenReturn(policies);
    Mockito.when(mPolicy.getAssertions()).thenReturn(assertions);
    
    String check = SignUtils.asCanonicalString(mockPolicy);
    assertNotNull(check);
    assertEquals(check,"{\"policies\":[{\"assertions\":[{}]}]}");
    
    Mockito.when(mPolicy.getAssertions()).thenReturn(null);
    
    check = SignUtils.asCanonicalString(mockPolicy);
    assertNotNull(check);
    assertEquals(check,"{\"policies\":[{}]}");
}