@Test public void testSelectBodyPartIterator() throws Exception { try (BodyPartIterator input = new BodyPartIterator(generateByteArrayInput(false))) { SelectByPosition selector = new SelectByPosition(); MimeBodyPart part = selector.select(input); assertNotNull(part); selector = new SelectByPosition(15); assertNull(selector.select(input)); } }
@Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } SelectByPosition();  SelectByPosition(int i); }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } SelectByPosition();  SelectByPosition(int i); @Override MimeBodyPart select(BodyPartIterator m); @Override List<MimeBodyPart> select(MimeMultipart in); int getPosition(); void setPosition(int i); }
SelectByPosition implements PartSelector { @Override public MimeBodyPart select(BodyPartIterator m) throws MessagingException { return m.getBodyPart(getPosition()); } SelectByPosition();  SelectByPosition(int i); @Override MimeBodyPart select(BodyPartIterator m); @Override List<MimeBodyPart> select(MimeMultipart in); int getPosition(); void setPosition(int i);  }