Tests that an exception is thrown when the map is not modifiable.
()
| 141 | * Tests that an exception is thrown when the map is not modifiable. |
| 142 | */ |
| 143 | @Test(expected = PropertyNotWritableException.class) |
| 144 | public void testSetValue05() { |
| 145 | MapELResolver mapELResolver = new MapELResolver(); |
| 146 | ELContext context = new StandardELContext(ELManager.getExpressionFactory()); |
| 147 | |
| 148 | Map<Object,Object> map = Collections.unmodifiableMap(new HashMap<>()); |
| 149 | mapELResolver.setValue(context, map, "key", "value"); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Tests that a null context results in an NPE as per EL Javadoc. |
nothing calls this directly
no test coverage detected