// Path: src/main/java/org/simplejavamail/outlookmessageparser/model/OutlookSmime.java
// public static class OutlookSmimeApplicationSmime extends OutlookSmime {
// 	private final String smimeMime;
// 	private final String smimeType;
// 	private final String smimeName;
// 		
// 	public OutlookSmimeApplicationSmime(String smimeMime, String smimeType, String smimeName) {
// 		this.smimeMime = smimeMime;
// 		this.smimeType = smimeType;
// 		this.smimeName = smimeName;
// 	}
// 		
// 	@Override
// 	public boolean equals(Object o) {
// 		if (this == o) return true;
// 		if (o == null || getClass() != o.getClass()) return false;
// 		OutlookSmimeApplicationSmime that = (OutlookSmimeApplicationSmime) o;
// 		return Objects.equals(smimeMime, that.smimeMime) &&
// 				Objects.equals(smimeType, that.smimeType) &&
// 				Objects.equals(smimeName, that.smimeName);
// 	}
// 		
// 	@Override
// 	public int hashCode() {
// 		return Objects.hash(smimeMime, smimeType, smimeName);
// 	}
// 		
// 	@Override
// 	public String toString() {
// 		final StringBuilder sb = new StringBuilder("OutlookSmimeApplicationSmime{");
// 		sb.append("smimeMime='").append(smimeMime).append('\'');
// 		sb.append(", smimeType='").append(smimeType).append('\'');
// 		sb.append(", smimeName='").append(smimeName).append('\'');
// 		sb.append('}');
// 		return sb.toString();
// 	}
// 		
// 	public String getSmimeMime() { return smimeMime; }
// 	public String getSmimeType() { return smimeType; }
// 	public String getSmimeName() { return smimeName; }
// }


import org.junit.Test;
import org.simplejavamail.outlookmessageparser.model.OutlookSmime.OutlookSmimeApplicationSmime;
import static org.assertj.core.api.Assertions.assertThat;
package org.simplejavamail.outlookmessageparser.model;



public class OutlookMessageTest {
	
	@Test
	public void testSetSmimeNull() {
		OutlookMessage msg = new OutlookMessage();
		msg.setSmimeApplicationSmime(null);
		assertThat(msg.getSmime()).isNull();
		msg.setSmimeApplicationSmime("");
		assertThat(msg.getSmime()).isNull();
		msg.setSmimeApplicationSmime("moomoo");
		assertThat(msg.getSmime()).isNull();
	}
	
	@Test
	public void testSetSmimeNonNull() {
		// application/pkcs7-mime;smime-type=signed-data;name=smime.p7m
		testSmime("application/pkcs7-mime", "application/pkcs7-mime", null, null);
		testSmime("application/pkcs7-mime;", "application/pkcs7-mime", null, null);
		testSmime("application/pkcs7-mime;name=moo", "application/pkcs7-mime", null, "moo");
		testSmime("application/pkcs7-mime;smime-type=signed-data;name=smime.p7m", "application/pkcs7-mime", "signed-data", "smime.p7m");
		testSmime("application/pkcs7-mime;name=smime.p7m;smime-type=signed-data", "application/pkcs7-mime", "signed-data", "smime.p7m");
		testSmime("application/pkcs7-mime;name=smime.p7m;smime-type=signed-data;", "application/pkcs7-mime", "signed-data", "smime.p7m");
	}
	
	private void testSmime(String smimeHeader, String smimeMime, String smimeType, String smimeName) {
		OutlookMessage msg = new OutlookMessage();
		msg.setSmimeApplicationSmime(smimeHeader);
		
// Path: src/main/java/org/simplejavamail/outlookmessageparser/model/OutlookSmime.java
// public static class OutlookSmimeApplicationSmime extends OutlookSmime {
// 	private final String smimeMime;
// 	private final String smimeType;
// 	private final String smimeName;
// 		
// 	public OutlookSmimeApplicationSmime(String smimeMime, String smimeType, String smimeName) {
// 		this.smimeMime = smimeMime;
// 		this.smimeType = smimeType;
// 		this.smimeName = smimeName;
// 	}
// 		
// 	@Override
// 	public boolean equals(Object o) {
// 		if (this == o) return true;
// 		if (o == null || getClass() != o.getClass()) return false;
// 		OutlookSmimeApplicationSmime that = (OutlookSmimeApplicationSmime) o;
// 		return Objects.equals(smimeMime, that.smimeMime) &&
// 				Objects.equals(smimeType, that.smimeType) &&
// 				Objects.equals(smimeName, that.smimeName);
// 	}
// 		
// 	@Override
// 	public int hashCode() {
// 		return Objects.hash(smimeMime, smimeType, smimeName);
// 	}
// 		
// 	@Override
// 	public String toString() {
// 		final StringBuilder sb = new StringBuilder("OutlookSmimeApplicationSmime{");
// 		sb.append("smimeMime='").append(smimeMime).append('\'');
// 		sb.append(", smimeType='").append(smimeType).append('\'');
// 		sb.append(", smimeName='").append(smimeName).append('\'');
// 		sb.append('}');
// 		return sb.toString();
// 	}
// 		
// 	public String getSmimeMime() { return smimeMime; }
// 	public String getSmimeType() { return smimeType; }
// 	public String getSmimeName() { return smimeName; }
// }


// Path: src/test/java/org/simplejavamail/outlookmessageparser/model/OutlookMessageTest.java
import org.junit.Test;
import org.simplejavamail.outlookmessageparser.model.OutlookSmime.OutlookSmimeApplicationSmime;
import static org.assertj.core.api.Assertions.assertThat;

package org.simplejavamail.outlookmessageparser.model;



public class OutlookMessageTest {
	
	@Test
	public void testSetSmimeNull() {
		OutlookMessage msg = new OutlookMessage();
		msg.setSmimeApplicationSmime(null);
		assertThat(msg.getSmime()).isNull();
		msg.setSmimeApplicationSmime("");
		assertThat(msg.getSmime()).isNull();
		msg.setSmimeApplicationSmime("moomoo");
		assertThat(msg.getSmime()).isNull();
	}
	
	@Test
	public void testSetSmimeNonNull() {
		// application/pkcs7-mime;smime-type=signed-data;name=smime.p7m
		testSmime("application/pkcs7-mime", "application/pkcs7-mime", null, null);
		testSmime("application/pkcs7-mime;", "application/pkcs7-mime", null, null);
		testSmime("application/pkcs7-mime;name=moo", "application/pkcs7-mime", null, "moo");
		testSmime("application/pkcs7-mime;smime-type=signed-data;name=smime.p7m", "application/pkcs7-mime", "signed-data", "smime.p7m");
		testSmime("application/pkcs7-mime;name=smime.p7m;smime-type=signed-data", "application/pkcs7-mime", "signed-data", "smime.p7m");
		testSmime("application/pkcs7-mime;name=smime.p7m;smime-type=signed-data;", "application/pkcs7-mime", "signed-data", "smime.p7m");
	}
	
	private void testSmime(String smimeHeader, String smimeMime, String smimeType, String smimeName) {
		OutlookMessage msg = new OutlookMessage();
		msg.setSmimeApplicationSmime(smimeHeader);
		
		OutlookSmimeApplicationSmime smime = (OutlookSmimeApplicationSmime) msg.getSmime();