### Question:
GCodeBuilder { public GCodeBuilder G4(final Double time) { block.add(new GCodeWord("G4", time)); return this; }  static GCodeBuilder builder(); GCodeBuilder set(final GCodeWord word); GCodeBuilder G0(final Double... args); GCodeBuilder G1(final Double... args); GCodeBuilder G4(final Double time); GCodeBuilder G2XYZIJP(final Double... args); GCodeBuilder G3XYIJZP(final Double... args); GCodeBuilder word(final String name, final Double value); GCodeBuilder A(Double v); GCodeBuilder B(Double v); GCodeBuilder C(Double v); GCodeBuilder X(Double v); GCodeBuilder Y(Double v); GCodeBuilder Z(Double v); GCodeBuilder U(Double v); GCodeBuilder V(Double v); GCodeBuilder W(Double v); GCodeBuilder G93(final double f); GCodeBuilder G92(final String axis, final Double offset); GCodeBuilder F(Double v); GCodeBuilder T(Double v); GCodeBuilder S(Double v); GCodeBuilder M3(final Double s); GCodeBuilder M4(final Double s); GCodeBuilder M5(); GCodeBuilder M2(); GCodeBuilder M30(); GCodeBuilder M7(); GCodeBuilder M8(); GCodeBuilder M9(); GCodeBuilder N(final Integer n); GCodeBuilder M6(Integer t); GCodeBuilder comment(final String comment); @Override /** * Generate a default GCode line. You properly want to create a dialect for your machine for some of the specifics */ String toString(); Collection<GCodeWord> getBlock(); static char COMMENTCHAR; }### Answer:
@Test public void testG4() throws IOException { generator.startProgram(); generator.addBlock(GCodeBuilder.builder().G4(10.0)); generator.endProgram(); String out = asString(); assertTrue(out.equals("G4 P10")); }