@Test
public void getConfigurationObjectFlagsNotBitString() throws ProtocolAdapterException {

    // SETUP
    final DataObject structure = mock(DataObject.class);
    when(structure.isComplex()).thenReturn(true);
    when(this.getResult.getResultData()).thenReturn(structure);
    final List<DataObject> elements = new ArrayList<>();
    final DataObject gprsMode = mock(DataObject.class);
    when(gprsMode.isNumber()).thenReturn(true);
    when(gprsMode.getValue()).thenReturn(42);
    elements.add(gprsMode);
    final DataObject flags = mock(DataObject.class);
    // flags is not a BitString
    when(flags.isBitString()).thenReturn(false);
    elements.add(flags);
    when(structure.getValue()).thenReturn(elements);
    assertThatExceptionOfType(ProtocolAdapterException.class).isThrownBy(() -> {
        // CALL
        this.instance.getConfigurationObject(this.getResult);
    });
}