### Question:
VersioningState implements State { @Override public boolean isEnabled() { return incrementalSerialSuffix != null || suffix != null || override != null; } VersioningState( final Properties userProps ); void initialise( Properties userProps ); @Override boolean isEnabled(); void setRESTMetadata( Map<ProjectRef, Set<String>> versionStates ); Map<ProjectRef, Set<String>> getRESTMetadata( ); void setVersionsByGAVMap( Map<ProjectVersionRef, String> versionsByGAV ); boolean hasVersionsByGAV(); String getRebuildSuffix(); @ConfigValue( docIndex = "project-version-manip.html#manual-version-suffix" )
    static final String VERSION_SUFFIX_SYSPROP; @ConfigValue( docIndex = "project-version-manip.html#automatic-version-increment")
    static final String INCREMENT_SERIAL_SUFFIX_SYSPROP; @ConfigValue( docIndex = "project-version-manip.html#version-increment-padding")
    static final String INCREMENT_SERIAL_SUFFIX_PADDING_SYSPROP; @ConfigValue( docIndex = "project-version-manip.html#snapshot-detection")
    static final String VERSION_SUFFIX_SNAPSHOT_SYSPROP; @ConfigValue( docIndex = "project-version-manip.html#osgi-compliance")
    static final String VERSION_OSGI_SYSPROP; @ConfigValue( docIndex = "project-version-manip.html#version-override")
    static final String VERSION_OVERRIDE_SYSPROP; @ConfigValue( docIndex = "project-version-manip.html#alternate-suffix-handling")
    static final String VERSION_SUFFIX_ALT; }### Answer:
@Test public void disabledByDefault() { final VersioningState state = new VersioningState( new Properties() ); assertThat( state.isEnabled(), equalTo( false ) ); }
@Test public void enableViaStaticSuffix() { final Properties p = new Properties(); p.setProperty( VersioningState.VERSION_SUFFIX_SYSPROP, "rebuild-1" ); final VersioningState state = new VersioningState( p ); assertThat( state.isEnabled(), equalTo( true ) ); }
@Test public void enableViaIncrementalSuffix() { final Properties p = new Properties(); p.setProperty( VersioningState.INCREMENT_SERIAL_SUFFIX_SYSPROP, "rebuild-1" ); final VersioningState state = new VersioningState( p ); assertThat( state.isEnabled(), equalTo( true ) ); }