@@ -0,0 +1,1622 @@
+package com.searchmetrics.simpleEmailService.dto;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.IOException;%0A%0Apublic class UploadAttachmentRequestTest %7B%0A    @Test%0A    public void testConstructorAndGetters() %7B%0A        UploadAttachmentRequest attachmentRequest = new UploadAttachmentRequest(%0A                %22file-name.txt%22, %22text/plain%22,%0A                %22VGhpcyBpcyB0aGUgYmVzdCBhdHRhY2htZW50IGV2ZXIgYmVlbiBzZW50IQo=%22%0A        );%0A%0A        Assert.assertEquals(%22file-name.txt%22, attachmentRequest.getName());%0A        Assert.assertEquals(%22text/plain%22, attachmentRequest.getMimeType());%0A        Assert.assertEquals(%22VGhpcyBpcyB0aGUgYmVzdCBhdHRhY2htZW50IGV2ZXIgYmVlbiBzZW50IQo=%22, attachmentRequest.getData());%0A    %7D%0A%0A    @Test%0A    public void testConstructorAndGettersUsingInputStream() throws IOException %7B%0A        UploadAttachmentRequest attachmentRequest = new UploadAttachmentRequest(%0A                %22file-name.txt%22, %22text/plain%22,%0A                new ByteArrayInputStream(%22This is the best attachment ever been sent!%22.getBytes())%0A        );%0A%0A        Assert.assertEquals(%22file-name.txt%22, attachmentRequest.getName());%0A        Assert.assertEquals(%22text/plain%22, attachmentRequest.getMimeType());%0A%0A        byte%5B%5D binData = %22This is the best attachment ever been sent!%22.getBytes();%0A        byte%5B%5D binDataFromAttachment = attachmentRequest.getByteArrayData();%0A%0A        Assert.assertEquals(binData.length, binDataFromAttachment.length);%0A        for (int i = 0; i %3C binData.length; i++) %7B%0A            Assert.assertEquals(binData%5Bi%5D, binDataFromAttachment%5Bi%5D);%0A        %7D%0A%0A    %7D%0A%7D

Add UploadAttachmentRequestTest