### Question:
AISBuilder { public AISBuilder integer(int bits, Enum value, Enum def) { if (value != null) { return integer(bits, value.ordinal()); } else { return integer(bits, def.ordinal()); } } AISBuilder();  AISBuilder(MessageTypes type, int mmsi); NMEASentence[] build(); AISBuilder string(int bits, CharSequence txt); AISBuilder rot(float rot); AISBuilder bool(boolean b); AISBuilder spare(int bits); AISBuilder decimal(int bits, double value, double coef); AISBuilder integer(int bits, Enum value, Enum def); AISBuilder integer(int bits, int value); AISBuilder polygon(Polygon polygon); AISBuilder polyline(Polygon polygon); AISBuilder circle(Circle circle); AISBuilder sector(Sector sector); AISBuilder associatedText(String text); static final NMEASentence[] EMPTY; }### Answer:
@Test public void testInteger() { AISBuilder builder = new AISBuilder(); builder.integer(3, 2); assertEquals("010", builder.bits()); builder.integer(3, -2); assertEquals("010110", builder.bits()); }