@Test
public void testPutDefaultAdmins() {

    ZMSClient client = createClient(systemAdminUser);
    ZMSRDLGeneratedClient c = Mockito.mock(ZMSRDLGeneratedClient.class);
    client.setZMSRDLGeneratedClient(c);
    DefaultAdmins adminsMock = Mockito.mock(DefaultAdmins.class);
    Mockito.when(c.putDefaultAdmins("sports", AUDIT_REF, adminsMock)).thenReturn(adminsMock);
    client.putDefaultAdmins("sports", AUDIT_REF, adminsMock);
    try {
        Mockito.when(c.putDefaultAdmins("media", AUDIT_REF, adminsMock))
                .thenThrow(new ZMSClientException(403, "Forbidden"));
        client.putDefaultAdmins("media", AUDIT_REF, adminsMock);
        fail();
    } catch (ZMSClientException ex) {
        assertEquals(ex.getCode(), 403);
    }
    try {
        Mockito.when(c.putDefaultAdmins("weather", AUDIT_REF, adminsMock))
                .thenThrow(new NullPointerException());
        client.putDefaultAdmins("weather", AUDIT_REF, adminsMock);
        fail();
    } catch (ZMSClientException ex) {
        assertEquals(ex.getCode(), 400);
    }
}