InheritanceModeOptions { public static InheritanceModeOptions of(Map<SubModeOfInheritance, Float> values) { Objects.requireNonNull(values); return new InheritanceModeOptions(values); } private  InheritanceModeOptions(Map<SubModeOfInheritance, Float> values); static InheritanceModeOptions defaults(); static InheritanceModeOptions empty(); static InheritanceModeOptions of(Map<SubModeOfInheritance, Float> values); static InheritanceModeOptions defaultForModes(ModeOfInheritance... modesOfInheritance); float getMaxFreqForMode(ModeOfInheritance modeOfInheritance); float getMaxFreqForSubMode(SubModeOfInheritance subModeOfInheritance); float getMaxFreq(); Set<ModeOfInheritance> getDefinedModes(); Set<SubModeOfInheritance> getDefinedSubModes(); boolean isEmpty(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void throwsExceptionWithNullInput() { assertThrows(NullPointerException.class, () -> InheritanceModeOptions.of(null)); }
@Test public void throwsExceptionWithNonPercentageValue() { Map<SubModeOfInheritance, Float> tooHigh = ImmutableMap.of(SubModeOfInheritance.AUTOSOMAL_DOMINANT, 101f); assertThrows(IllegalArgumentException.class, () -> InheritanceModeOptions.of(tooHigh)); Map<SubModeOfInheritance, Float> tooLow = ImmutableMap.of(SubModeOfInheritance.AUTOSOMAL_DOMINANT, -1f); assertThrows(IllegalArgumentException.class, () -> InheritanceModeOptions.of(tooLow)); }
@Test public void testMaxAndMinValues() { Map<SubModeOfInheritance, Float> max = ImmutableMap.of(SubModeOfInheritance.AUTOSOMAL_DOMINANT, 100f); InheritanceModeOptions.of(max); Map<SubModeOfInheritance, Float> min = ImmutableMap.of(SubModeOfInheritance.AUTOSOMAL_DOMINANT, 0f); InheritanceModeOptions.of(min); }