### Question:
VwapUdf { @Udf(description = "vwap for market prices as integers, returns double") public double vwap( @UdfParameter(value = "bid") final int bid, @UdfParameter(value = "bidQty") final int bidQty, @UdfParameter(value = "ask") final int ask, @UdfParameter(value = "askQty") final int askQty) { return ((ask * askQty) + (bid * bidQty)) / (bidQty + askQty); }  @Udf(description = "vwap for market prices as integers, returns double") double vwap(
            @UdfParameter(value = "bid")
            final int bid,
            @UdfParameter(value = "bidQty")
            final int bidQty,
            @UdfParameter(value = "ask")
            final int ask,
            @UdfParameter(value = "askQty")
            final int askQty); @Udf(description = "vwap for market prices as doubles, returns double") double vwap(
            @UdfParameter(value = "bid")
            final double bid,
            @UdfParameter(value = "bidQty")
            final int bidQty,
            @UdfParameter(value = "ask")
            final double ask,
            @UdfParameter(value = "askQty")
            final int askQty);  }### Answer:
@Test public void testVwapAllInts() { assertEquals(100D, new VwapUdf().vwap(95, 100, 105, 100), 0D); }
@Test public void testVwap() { assertEquals(100D, new VwapUdf().vwap(95D, 100, 105D, 100), 0D); }