public void push(FilePropertiesSpec filePropertiesSpec) {
    Preconditions.checkState(
        stack.size() < 3, "Error in file properties stack push, stacking over 3");
    stack.add(filePropertiesSpec);
    updateProperties();
  }
@Test
  public void testPush_tooMany() {
    FilePropertiesStack testStack = new FilePropertiesStack();

    testStack.push(new FilePropertiesSpec("111", "111", "1", "1", "1"));
    testStack.push(new FilePropertiesSpec("111", "111", "1", "1", "1"));
    testStack.push(new FilePropertiesSpec("111", "111", "1", "1", "1"));

    try {
      testStack.push(new FilePropertiesSpec("111", "111", "1", "1", "1"));
      Assert.fail();
    } catch (IllegalStateException ise) {
      Assert.assertEquals("Error in file properties stack push, stacking over 3", ise.getMessage());
    }
  }