// Path: src/main/java/com/mailosaur/models/UsageAccountLimits.java
// public class UsageAccountLimits {
//     /**
//      * Server limits.
//      */
//     @Key
//     private UsageAccountLimit servers;
// 
//     /**
//      * User limits.
//      */
//     @Key
//     private UsageAccountLimit users;
// 
//     /**
//      * Emails per day limits.
//      */
//     @Key
//     private UsageAccountLimit email;
// 
//     /**
//      * SMS message per month limits.
//      */
//     @Key
//     private UsageAccountLimit sms;
// 
//     /**
//      * Gets server limits.
//      *
//      * @return Server limits.
//      */
//     public UsageAccountLimit servers() {
//         return this.servers;
//     }
// 
//     /**
//      * Gets user limits.
//      *
//      * @return User limits.
//      */
//     public UsageAccountLimit users() {
//         return this.users;
//     }
// 
//     /**
//      * Gets emails per day limits.
//      *
//      * @return Emails per day limits.
//      */
//     public UsageAccountLimit email() {
//         return this.email;
//     }
// 
//     /**
//      * Gets SMS message per month limits.
//      *
//      * @return SMS message per month limits.
//      */
//     public UsageAccountLimit sms() {
//         return this.sms;
//     }
// }
// 
// Path: src/main/java/com/mailosaur/models/UsageTransactionListResult.java
// public class UsageTransactionListResult {
//     /**
//      * The individual transactions that have occurred.
//      */
//     @Key
//     private List<UsageTransaction> items;
// 
//     /**
//      * Gets the individual transactions that have occurred.
//      *
//      * @return The individual transactions that have occurred.
//      */
//     public List<UsageTransaction> items() {
//         return this.items;
//     }
// }


import static org.junit.Assert.*;
import java.io.IOException;
import javax.mail.MessagingException;
import org.junit.BeforeClass;
import org.junit.Test;
import com.mailosaur.models.UsageAccountLimits;
import com.mailosaur.models.UsageTransactionListResult;
package com.mailosaur;






public class UsageTest {
	private static MailosaurClient client;
	
	@BeforeClass
    public static void setUpBeforeClass() throws IOException, InterruptedException, MessagingException {
		String apiKey = System.getenv("MAILOSAUR_API_KEY");
		String baseUrl = System.getenv("MAILOSAUR_BASE_URL");

		if (apiKey == null) {
			throw new IOException("Missing necessary environment variables - refer to README.md");
		}

        client = new MailosaurClient(apiKey, baseUrl);
	}
	
	@Test
    public void testLimits() throws IOException, MailosaurException {
		UsageAccountLimits result = client.usage().limits();
		assertNotNull(result.servers());
		assertNotNull(result.users());
		assertNotNull(result.email());
		assertNotNull(result.sms());

		assertTrue(result.servers().limit() > 0);
		assertTrue(result.users().limit() > 0);
		assertTrue(result.email().limit() > 0);
		assertTrue(result.sms().limit() > 0);
    }

	@Test
    public void testTransactions() throws IOException, MailosaurException {
// Path: src/main/java/com/mailosaur/models/UsageAccountLimits.java
// public class UsageAccountLimits {
//     /**
//      * Server limits.
//      */
//     @Key
//     private UsageAccountLimit servers;
// 
//     /**
//      * User limits.
//      */
//     @Key
//     private UsageAccountLimit users;
// 
//     /**
//      * Emails per day limits.
//      */
//     @Key
//     private UsageAccountLimit email;
// 
//     /**
//      * SMS message per month limits.
//      */
//     @Key
//     private UsageAccountLimit sms;
// 
//     /**
//      * Gets server limits.
//      *
//      * @return Server limits.
//      */
//     public UsageAccountLimit servers() {
//         return this.servers;
//     }
// 
//     /**
//      * Gets user limits.
//      *
//      * @return User limits.
//      */
//     public UsageAccountLimit users() {
//         return this.users;
//     }
// 
//     /**
//      * Gets emails per day limits.
//      *
//      * @return Emails per day limits.
//      */
//     public UsageAccountLimit email() {
//         return this.email;
//     }
// 
//     /**
//      * Gets SMS message per month limits.
//      *
//      * @return SMS message per month limits.
//      */
//     public UsageAccountLimit sms() {
//         return this.sms;
//     }
// }
// 
// Path: src/main/java/com/mailosaur/models/UsageTransactionListResult.java
// public class UsageTransactionListResult {
//     /**
//      * The individual transactions that have occurred.
//      */
//     @Key
//     private List<UsageTransaction> items;
// 
//     /**
//      * Gets the individual transactions that have occurred.
//      *
//      * @return The individual transactions that have occurred.
//      */
//     public List<UsageTransaction> items() {
//         return this.items;
//     }
// }


// Path: src/test/java/com/mailosaur/UsageTest.java
import static org.junit.Assert.*;
import java.io.IOException;
import javax.mail.MessagingException;
import org.junit.BeforeClass;
import org.junit.Test;
import com.mailosaur.models.UsageAccountLimits;
import com.mailosaur.models.UsageTransactionListResult;

package com.mailosaur;






public class UsageTest {
	private static MailosaurClient client;
	
	@BeforeClass
    public static void setUpBeforeClass() throws IOException, InterruptedException, MessagingException {
		String apiKey = System.getenv("MAILOSAUR_API_KEY");
		String baseUrl = System.getenv("MAILOSAUR_BASE_URL");

		if (apiKey == null) {
			throw new IOException("Missing necessary environment variables - refer to README.md");
		}

        client = new MailosaurClient(apiKey, baseUrl);
	}
	
	@Test
    public void testLimits() throws IOException, MailosaurException {
		UsageAccountLimits result = client.usage().limits();
		assertNotNull(result.servers());
		assertNotNull(result.users());
		assertNotNull(result.email());
		assertNotNull(result.sms());

		assertTrue(result.servers().limit() > 0);
		assertTrue(result.users().limit() > 0);
		assertTrue(result.email().limit() > 0);
		assertTrue(result.sms().limit() > 0);
    }

	@Test
    public void testTransactions() throws IOException, MailosaurException {
		UsageTransactionListResult result = client.usage().transactions();