1   package test.mock.mail;
2   
3   import javax.mail.*;
4   import javax.activation.DataHandler;
5   import java.util.Enumeration;
6   import java.util.Date;
7   import java.io.IOException;
8   import java.io.InputStream;
9   import java.io.OutputStream;
10  
11  
12  /**
13   * A dummy Message implementation for testing.
14   */
15  public class MockMessage extends Message
16  {
17  
18      public void addFrom(Address[] addresses) throws MessagingException
19      {
20      }
21  
22      public void addHeader(String string, String string1) throws MessagingException
23      {
24      }
25  
26      public void addRecipients(RecipientType recipientType, Address[] addresses) throws MessagingException
27      {
28      }
29  
30      public Enumeration getAllHeaders() throws MessagingException
31      {
32          return null;
33      }
34  
35      public Object getContent() throws IOException, MessagingException
36      {
37          return null;
38      }
39  
40      public String getContentType() throws MessagingException
41      {
42          return null;
43      }
44  
45      public DataHandler getDataHandler() throws MessagingException
46      {
47          return null;
48      }
49  
50      public String getDescription() throws MessagingException
51      {
52          return null;
53      }
54  
55      public String getDisposition() throws MessagingException
56      {
57          return null;
58      }
59  
60      public String getFileName() throws MessagingException
61      {
62          return null;
63      }
64  
65      public Flags getFlags() throws MessagingException
66      {
67          return null;
68      }
69  
70      public Address[] getFrom() throws MessagingException
71      {
72          return new Address[0];
73      }
74  
75      public String[] getHeader(String string) throws MessagingException
76      {
77          return new String[0];
78      }
79  
80      public InputStream getInputStream() throws IOException, MessagingException
81      {
82          return null;
83      }
84  
85      public int getLineCount() throws MessagingException
86      {
87          return 0;
88      }
89  
90      public Enumeration getMatchingHeaders(String[] strings) throws MessagingException
91      {
92          return null;
93      }
94  
95      public Enumeration getNonMatchingHeaders(String[] strings) throws MessagingException
96      {
97          return null;
98      }
99  
100     public Date getReceivedDate() throws MessagingException
101     {
102         return null;
103     }
104 
105     public Address[] getRecipients(RecipientType recipientType) throws MessagingException
106     {
107         return new Address[0];
108     }
109 
110     public Date getSentDate() throws MessagingException
111     {
112         return null;
113     }
114 
115     public int getSize() throws MessagingException
116     {
117         return 0;
118     }
119 
120     public String getSubject() throws MessagingException
121     {
122         return null;
123     }
124 
125     public boolean isMimeType(String string) throws MessagingException
126     {
127         return false;
128     }
129 
130     public void removeHeader(String string) throws MessagingException
131     {
132     }
133 
134     public Message reply(boolean b) throws MessagingException
135     {
136         return null;
137     }
138 
139     public void saveChanges() throws MessagingException
140     {
141     }
142 
143     public void setContent(Multipart multipart) throws MessagingException
144     {
145     }
146 
147     public void setContent(Object object, String string) throws MessagingException
148     {
149     }
150 
151     public void setDataHandler(DataHandler dataHandler) throws MessagingException
152     {
153     }
154 
155     public void setDescription(String string) throws MessagingException
156     {
157     }
158 
159     public void setDisposition(String string) throws MessagingException
160     {
161     }
162 
163     public void setFileName(String string) throws MessagingException
164     {
165     }
166 
167     public void setFlags(Flags flags, boolean b) throws MessagingException
168     {
169     }
170 
171     public void setFrom() throws MessagingException
172     {
173     }
174 
175     public void setFrom(Address address) throws MessagingException
176     {
177     }
178 
179     public void setHeader(String string, String string1) throws MessagingException
180     {
181     }
182 
183     public void setRecipients(RecipientType recipientType, Address[] addresses) throws MessagingException
184     {
185     }
186 
187     public void setSentDate(Date date) throws MessagingException
188     {
189     }
190 
191     public void setSubject(String string) throws MessagingException
192     {
193     }
194 
195     public void setText(String string) throws MessagingException
196     {
197     }
198 
199     public void writeTo(OutputStream outputStream) throws IOException, MessagingException
200     {
201     }
202 }