Deviation implements Serializable { public void setItem2(ItemVO<Integer, Integer> item2) { validateItem(item2); item2Id = item2.getItem(); item2TypeId = item2.getType(); } Deviation(ItemVO<Integer, Integer> item1, ItemVO<Integer, Integer> item2, double numerator,
                     long denominator);  Deviation(@Nullable Integer id, ItemVO<Integer, Integer> item1,
                     ItemVO<Integer, Integer> item2, double numerator, long denominator);  Deviation(int tenantId, int item1Id, int item1TypeId, int item2Id, int item2TypeId, double numerator,
                     long denominator);  Deviation(@Nullable Integer id, int tenantId, int item1Id, int item1TypeId, int item2Id, int item2TypeId,
                     double numerator, long denominator); static long hashCodeOfItems(int item1Id, int item1TypeId, int item2Id, int item2TypeId); long getDenominator(); void setDenominator(long denominator); @Nullable Integer getId(); void setId(@Nullable Integer id); int getItem1Id(); void setItem1Id(int item1Id); int getItem2Id(); void setItem2Id(int item2Id); int getItem1TypeId(); void setItem1TypeId(int item1TypeId); int getItem2TypeId(); void setItem2TypeId(int item2TypeId); double getNumerator(); void setNumerator(double numerator); int getTenantId(); void setTenantId(int tenantId); @Override int hashCode(); @Override String toString(); boolean equalsWithDeviationAndId(Deviation other); boolean equalsWithDeviation(Deviation other); @Override boolean equals(Object obj); double getDeviation(); ItemVO<Integer, Integer> getItem1(); ItemVO<Integer, Integer> getItem2(); long hashCodeOfItems(); void setItem1(ItemVO<Integer, Integer> item1); void setItem2(ItemVO<Integer, Integer> item2); void setItems(ItemVO<Integer, Integer> item1, ItemVO<Integer, Integer> item2);  }
@Test(expected = NullPointerException.class) @SuppressWarnings({"NullableProblems"}) public void setItem1_shouldThrowOnNull() { deviation.setItem2(null); }
@Test(expected = IllegalArgumentException.class) public void setItem2_shouldThrowOnInvalidTenant() { deviation.setItem2(item3); }
@Test(expected = NullPointerException.class) @SuppressWarnings({"NullableProblems"}) public void setItem2_shouldThrowOnNull() { deviation.setItem2(null); }