### Question:
CharTagMapBuilder { public CharTagMap build() throws IllegalArgumentException { CharTagMap tm = CharTagMap.getInstance(); if (tagSize != null) tm.setTagSize(tagSize); if (lengthSize != null) tm.setLengthSize(lengthSize); tm.withTagLengthSwap(swapTagWithLength); return tm; } CharTagMapBuilder(); CharTagMapBuilder withLengthSize(int size); CharTagMapBuilder withTagSize(int size); CharTagMapBuilder withTagLengthSwap(boolean swap); CharTagMap build();  }### Answer:
@Test public void testBuildDefault() { CharTagMap tm = instance.build(); tm.unpack("XY019The quick brown foxKV007Foo Bar"); assertEquals("The quick brown fox", tm.getTagValue("XY")); assertEquals("Foo Bar", tm.getTagValue("KV")); String result = tm.pack(); tm.clear(); tm.unpack(result); assertEquals("The quick brown fox", tm.getTagValue("XY")); assertEquals("Foo Bar", tm.getTagValue("KV")); }
@Test public void testBuild() { CharTagMap tm = instance.withTagSize(3) .withLengthSize(2) .build(); tm.unpack("XYZ19The quick brown foxKV107Foo Bar"); assertEquals("The quick brown fox", tm.getTagValue("XYZ")); assertEquals("Foo Bar", tm.getTagValue("KV1")); String result = tm.pack(); tm.clear(); tm.unpack(result); assertEquals("The quick brown fox", tm.getTagValue("XYZ")); assertEquals("Foo Bar", tm.getTagValue("KV1")); }