### Question:
PipesBuilder implements Builder<Pipes> { public PipesBuilder withMap(final String map) { this.map.set(map); return this; } PipesBuilder(); PipesBuilder withMap(final String map); PipesBuilder withReduce(final String reduce); PipesBuilder withInputformat(final String inputformat); PipesBuilder withPartitioner(final String partitioner); PipesBuilder withWriter(final String writer); PipesBuilder withProgram(final String program); @Override Pipes build();  }### Answer:
@Test public void testWithMap() { final String map = "map"; final PipesBuilder builder = new PipesBuilder(); builder.withMap(map); final Pipes pipes = builder.build(); assertEquals(map, pipes.getMap()); }
@Test public void testMapCalledTwiceThrows() { final String map1 = "map1"; final String map2 = "map2"; final PipesBuilder builder = new PipesBuilder(); builder.withMap(map1); expectedException.expect(IllegalStateException.class); builder.withMap(map2); }