### Question:
SimpleStructBuilder implements StructBuilder { @Override public T build() { T retval = struct; resetStruct(); return retval; } SimpleStructBuilder(final Class<T> clazz); @Override SimpleStructBuilder<T> set(final String field, final String value); @Override SimpleStructBuilder<T> set(final String field, final Number value); @Override SimpleStructBuilder<T> set(final String field, final byte[] value); @Override SimpleStructBuilder<T> set(final String field, final Struct value); @Override T build();  }### Answer:
@Test public final void testBuild() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException { TestStruct struct = new SimpleStructBuilder<>(TestStruct.class) .set("testShort", NUMBER) .set("testByte", NUMBER) .set("testEmbeddedStruct", new SimpleStructBuilder<>(TestEmbeddedStruct.class) .set("embeddedShort", NUMBER) .set("embedded", ARRAY) .build()) .set("testVariableStruct", new SimpleStructBuilder<>(TestVariableStruct.class) .set("testArray", ARRAY) .build()) .build(); assertEquals(struct.getTestShort(), NUMBER); assertEquals(struct.getTestByte(), NUMBER); assertEquals(struct.getTestEmbeddedStruct().getEmbeddedShort(), NUMBER); assertEquals(struct.getTestEmbeddedStruct().getEmbedded(), ARRAY); assertEquals(struct.getTestEmbeddedStruct().getEmbeddedSize(), ARRAY.length); assertEquals(struct.getTestVariableStruct().getTestArray(), ARRAY); assertEquals(struct.getTestVariableStructLength(), ARRAY.length); }