### Question:
BitFieldDataType extends AbstractDataType { public int getBitSize() { return effectiveBitSize; } protected  BitFieldDataType(DataType baseDataType, int bitSize, int bitOffset); protected  BitFieldDataType(DataType baseDataType, int bitSize); boolean isZeroLengthField(); static int getEffectiveBitSize(int declaredBitSize, int baseTypeByteSize); static int getMinimumStorageSize(int bitSize); static int getMinimumStorageSize(int bitSize, int bitOffset); static void checkBaseDataType(DataType baseDataType); static boolean isValidBaseDataType(DataType baseDataType); @Override void addParent(DataType dt); int getBaseTypeSize(); int getStorageSize(); int getBitSize(); int getDeclaredBitSize(); int getBitOffset(); DataType getBaseDataType(); AbstractIntegerDataType getPrimitiveBaseDataType(); @Override final SettingsDefinition[] getSettingsDefinitions(); @Override final boolean isEquivalent(DataType dt); @Override final int hashCode(); @Override final boolean equals(Object obj); @Override Settings getDefaultSettings(); @Override final DataType copy(DataTypeManager dtm); @Override BitFieldDataType clone(DataTypeManager dtm); @Override int getLength(); @Override String getDescription(); @Override Object getValue(MemBuffer buf, Settings settings, int length); @Override Class<?> getValueClass(Settings settings); @Override String getRepresentation(MemBuffer buf, Settings settings, int length); @Override void setDefaultSettings(Settings settings); @Override int getAlignment(); @Override String toString();  }### Answer:
@Test public void testGetBitSize() throws Exception { assertEquals(1, new BitFieldDataType(CharDataType.dataType, 1).getBitSize()); assertEquals(2, new BitFieldDataType(UnsignedCharDataType.dataType, 2).getBitSize()); assertEquals(3, new BitFieldDataType(ShortDataType.dataType, 3).getBitSize()); assertEquals(4, new BitFieldDataType(UnsignedShortDataType.dataType, 4).getBitSize()); assertEquals(5, new BitFieldDataType(IntegerDataType.dataType, 5).getBitSize()); assertEquals(6, new BitFieldDataType(UnsignedIntegerDataType.dataType, 6).getBitSize()); }