Ejemplo n.º 1
0
 @Test(expected = IllegalStateException.class)
 public void testAddCannotBeCalledAfterBuild() throws Exception {
   NamedListBuilder<String> builder = new NamedListBuilder<>();
   builder.build();
   builder.add("foo", "bar");
 }
Ejemplo n.º 2
0
 @Test(expected = IllegalStateException.class)
 public void testBuildCannotBeCalledMoreThanOnce() throws Exception {
   NamedListBuilder<String> builder = new NamedListBuilder<>();
   builder.build();
   builder.build();
 }