Experiment implements Comparable<Experiment>, Nameable, ChangeLoggable, Deletable, Serializable { public Collection<Kit> getKitsByKitType(KitType kitType) { final ArrayList<Kit> ks = new ArrayList<>(); for (final Kit k : kits) { if (k.getKitDescriptor().getKitType().equals(kitType)) { ks.add(k); } } Collections.sort(ks); return ks; }  @CoverageIgnore void addKit(Kit kit); @Override @CoverageIgnore int compareTo(Experiment t); @Override ChangeLog createChangeLog(String summary, String columnsChanged, User user); @Override @CoverageIgnore boolean equals(Object obj); String getAccession(); String getAlias(); @Override List<ChangeLog> getChangeLog(); String getDescription(); @Override long getId(); Collection<Kit> getKits(); Collection<Kit> getKitsByKitType(KitType kitType); Library getLibrary(); @Override String getName(); InstrumentModel getInstrumentModel(); List<RunPartition> getRunPartitions(); Study getStudy(); String getTitle(); @Override @CoverageIgnore int hashCode(); void setAccession(String accession); void setAlias(String alias); void setDescription(String description); @Override void setId(long id); void setKits(Collection<Kit> kits); void setLibrary(Library library); void setName(String name); void setInstrumentModel(InstrumentModel instrumentModel); void setRunPartitions(List<RunPartition> runPartitions); void setStudy(Study study); void setTitle(String title); @Override User getCreator(); @Override void setCreator(User creator); @Override Date getCreationTime(); @Override void setCreationTime(Date creationTime); @Override User getLastModifier(); @Override void setLastModifier(User lastModifier); @Override Date getLastModified(); @Override void setLastModified(Date lastModified); @Override boolean isSaved(); @Override String getDeleteType(); @Override String getDeleteDescription();  }
@Test public final void testGetKitsByKitType() { final Collection<Kit> expectedLibraryKits = getNMockKits(3, KitType.LIBRARY); final Collection<Kit> expectedSequencingKits = getNMockKits(2, KitType.SEQUENCING); final Collection<Kit> expectedClusteringKits = getNMockKits(5, KitType.CLUSTERING); final Collection<Kit> expectedMultiplexingKits = getNMockKits(6, KitType.MULTIPLEXING); final Collection<Kit> libraryKits = ae.getKitsByKitType(KitType.LIBRARY); final Collection<Kit> sequencingKits = ae.getKitsByKitType(KitType.SEQUENCING); final Collection<Kit> clusteringKits = ae.getKitsByKitType(KitType.CLUSTERING); final Collection<Kit> multiplexingKits = ae.getKitsByKitType(KitType.MULTIPLEXING); assertKitListEqual(expectedLibraryKits, libraryKits); assertKitListEqual(expectedSequencingKits, sequencingKits); assertKitListEqual(expectedClusteringKits, clusteringKits); assertKitListEqual(expectedMultiplexingKits, multiplexingKits); }