### Question:
FilePropertiesStack { public void push(FilePropertiesSpec filePropertiesSpec) { Preconditions.checkState( stack.size() < 3, "Error in file properties stack push, stacking over 3"); stack.add(filePropertiesSpec); updateProperties(); } FilePropertiesStack(); void push(FilePropertiesSpec filePropertiesSpec); void pop(); FilePermissions getFilePermissions(); FilePermissions getDirectoryPermissions(); Instant getModificationTime(); String getOwnership();  }### Answer:
@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()); } }