/** Test of setTopicCount method, of class LatentDirichletAllocationVectorGibbsSampler. */
  @Test
  public void testSetTopicCount() {
    int topicCount = LatentDirichletAllocationVectorGibbsSampler.DEFAULT_TOPIC_COUNT;
    LatentDirichletAllocationVectorGibbsSampler instance =
        new LatentDirichletAllocationVectorGibbsSampler();
    assertEquals(topicCount, instance.getTopicCount());

    topicCount = 77;
    instance.setTopicCount(topicCount);
    assertEquals(topicCount, instance.getTopicCount());

    boolean exceptionThrown = false;
    try {
      instance.setTopicCount(0);
    } catch (IllegalArgumentException e) {
      exceptionThrown = true;
    } finally {
      assertTrue(exceptionThrown);
    }
    assertEquals(topicCount, instance.getTopicCount());

    exceptionThrown = false;
    try {
      instance.setTopicCount(-1);
    } catch (IllegalArgumentException e) {
      exceptionThrown = true;
    } finally {
      assertTrue(exceptionThrown);
    }
    assertEquals(topicCount, instance.getTopicCount());
  }