    @Test
    public void itThrowsIfTheLogProbShapeDoesntMatchTheNumberOfCategories() {

        thrown.expect(IllegalArgumentException.class);
        thrown.expectMessage("x shape must have far right dimension matching number of categories k 4");

        IntegerTensor n = IntegerTensor.create(100);
        DoubleTensor p = DoubleTensor.create(0.1, 0.2, .3, 0.4);
        MultinomialVertex multinomial = new MultinomialVertex(n, p);
        multinomial.setValidationEnabled(true);
        multinomial.logProb(IntegerTensor.scalar(1));
    }