This is the sample code that can I found in the google.
This code is a unitTest for deleteAccount

package zimbra;

import java.util.HashMap;
import java.util.Map;

import com.zimbra.cs.account.Account;
import com.zimbra.cs.account.Provisioning;
import com.zimbra.cs.account.Provisioning.AccountBy;
import com.zimbra.cs.client.LmcSession;
import com.zimbra.cs.client.soap.LmcDeleteAccountRequest;
import com.zimbra.cs.db.DbMailbox;
import com.zimbra.cs.db.DbResults;
import com.zimbra.cs.db.DbUtil;
import com.zimbra.common.localconfig.LC;
import com.zimbra.cs.mailbox.Mailbox;
import com.zimbra.cs.mailbox.MailboxManager;
import com.zimbra.common.util.ZimbraLog;


 * @author bburtin
public class TestAccount{

    private static String USER_NAME = "TestAccount";
    // xxx move this to TestUtil
    private static String PASSWORD = "123456";

    public static void main(String [] args)
    throws Exception {
        Map<String, Object> attrs = new HashMap<String, Object>();
        attrs.put("", LC.zimbra_server_hostname.value());
        attrs.put("cn", "TestAccount");
        attrs.put("displayName", "TestAccount unit test user");
        Provisioning.getInstance().createAccount(TestUtil.getAddress(USER_NAME), PASSWORD, attrs);
    public void tearDown()
    throws Exception {
    public void testDeleteAccount()
    throws Exception {
        // Get the account and mailbox
        Account account = TestUtil.getAccount(USER_NAME);
        Mailbox mbox = MailboxManager.getInstance().getMailboxByAccount(account);
        String dbName = DbMailbox.getDatabaseName(mbox);
        ZimbraLog.test.debug("Account=" + account.getId() + ", mbox=" + mbox.getId());
        // Confirm that the mailbox database exists
        DbResults results = DbUtil.executeQuery(
            "SELECT COUNT(*) FROM mailbox WHERE id = " + mbox.getId());
        System.out.println("Could not find row in mailbox table"+ " 1 " + results.getInt(1));
        results = DbUtil.executeQuery("SHOW DATABASES LIKE '" + dbName + "'");
        System.out.println("Could not find mailbox database"+" 1 " + results.size());
        // Delete the account
        LmcSession session = TestUtil.getAdminSoapSession();
        LmcDeleteAccountRequest req = new LmcDeleteAccountRequest(account.getId());
        // Confirm that the mailbox was deleted
        results = DbUtil.executeQuery(
            "SELECT COUNT(*) FROM mailbox WHERE id = " + mbox.getId());
         System.out.println("Unexpected row in mailbox table"+" 0 "+ results.getInt(1));
    private static void cleanUp()
    throws Exception {
        Provisioning prov = Provisioning.getInstance(); 
        Account account = prov.get(, TestUtil.getAddress(USER_NAME));
        if (account != null) {
The code no manage to executed...

Compiling 1 source file to C:\Practice\Zimbra\build\classes
log4j:WARN No appenders could be found for logger (zimbra.misc).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap
at com.zimbra.cs.account.AccountCache.<init>(AccountC
at com.zimbra.cs.account.ldap.LdapProvisioning.<clini t>(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.zimbra.cs.account.Provisioning.getInstance(Pro
at zimbra.TestAccount.cleanUp(
at zimbra.TestAccount.main(
Caused by: java.lang.ClassNotFoundException:
at$ 200)
at Method)
at ava:188)
at java.lang.ClassLoader.loadClass( 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche
at java.lang.ClassLoader.loadClass( 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade
... 7 more
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)
Thank you