Buggy code:
public class GeoDataStoreApiStepdefs { private static Logger logger = LoggerFactory . getLogger ( GeoDataStoreApiStepdefs . class ) ; private static boolean usePdok = true ; private boolean useProxy = false ; private static Configuration conf = new Configuration ( GeoDataStoreApiStepdefs . usePdok ) ; private static String fullurl = GeoDataStoreApiStepdefs . conf . getFullUrl ( ) ; private static String baseUrl = ( GeoDataStoreApiStepdefs . fullurl ) + "//api//v1" ; private static String baseDataSetUrl = ( GeoDataStoreApiStepdefs . baseUrl ) + "//dataset" ; private static String baseCodeListUrl = ( GeoDataStoreApiStepdefs . baseUrl ) + "//registry" ; private CloseableHttpResponse response ; private TestClient testclient ; private String lastIdentifier ; private StringBuffer resultText ; private MetaDataResponse mdresponse = new MetaDataResponse ( ) ; private JsonConverter json = new JsonConverter ( ) ; private GeoDataStoreApiContext context = GeoDataStoreApiContext . getInstance ( ) ; private UUID uuid = null ; @ Given ( "^There<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>testclient$" ) public void there_is_a_testclient ( ) throws Throwable { } @ When ( "^I<seq2seq4repair_space>ask<seq2seq4repair_space>for<seq2seq4repair_space>known<seq2seq4repair_space>codelists$" ) public void i_ask_for_known_codelists ( ) throws Throwable { } private File getRandomFile ( ) { } @ When ( "^I<seq2seq4repair_space>upload<seq2seq4repair_space>a<seq2seq4repair_space>random<seq2seq4repair_space>file$" ) public void i_upload_a_random_file ( ) throws Throwable { } @ Then ( "^I<seq2seq4repair_space>get<seq2seq4repair_space>a<seq2seq4repair_space>http<seq2seq4repair_space>success<seq2seq4repair_space>status$" ) public void i_get_a_http_success_status ( ) throws Throwable { } @ Then ( "^I<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>identifier<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>uploaded<seq2seq4repair_space>dataset$" ) public void i_get_the_identifier_of_the_uploaded_dataset ( ) throws Throwable { } @ Given ( "^The<seq2seq4repair_space>identifier<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>uploaded<seq2seq4repair_space>dataset<seq2seq4repair_space>is<seq2seq4repair_space>known$" ) public void the_identifier_of_the_uploaded_dataset_is_known ( ) throws Throwable { } @ When ( "^I<seq2seq4repair_space>add<seq2seq4repair_space>descriptive<seq2seq4repair_space>metadata<seq2seq4repair_space>with<seq2seq4repair_space>status<seq2seq4repair_space>draft$" ) public void i_add_descriptive_metadata_with_status_draft ( ) throws Throwable { } @ Then ( "^I<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>defined<seq2seq4repair_space>meta<seq2seq4repair_space>data<seq2seq4repair_space>back$" ) public void i_get_the_defined_meta_data_back ( ) throws Throwable { } @ Given ( "^The<seq2seq4repair_space>metadata<seq2seq4repair_space>are<seq2seq4repair_space>uploaded<seq2seq4repair_space>and<seq2seq4repair_space>valid$" ) public void the_metadata_are_uploaded_and_valid ( ) throws Throwable { } @ When ( "^I<seq2seq4repair_space>publish<seq2seq4repair_space>the<seq2seq4repair_space>uploaded<seq2seq4repair_space>dataset<seq2seq4repair_space>with<seq2seq4repair_space>valid<seq2seq4repair_space>metadata$" ) public void i_publish_the_uploaded_dataset_with_valid_metadata ( ) throws Throwable { } @ Then ( "^I<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>defined<seq2seq4repair_space>meta<seq2seq4repair_space>data<seq2seq4repair_space>with<seq2seq4repair_space>status<seq2seq4repair_space>published<seq2seq4repair_space>back$" ) public void i_get_the_defined_meta_data_with_status_published_back ( ) throws Throwable { } @ Given ( "^The<seq2seq4repair_space>dataset<seq2seq4repair_space>is<seq2seq4repair_space>successfully<seq2seq4repair_space>published$" ) public void the_dataset_is_successfully_published ( ) throws Throwable { } private String checkedUrl ( final String downloadUrl ) { } @ When ( "^I<seq2seq4repair_space>download<seq2seq4repair_space>the<seq2seq4repair_space>published<seq2seq4repair_space>dataset$" ) public void i_download_the_published_dataset ( ) throws Throwable { } @ Then ( "^I<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>random<seq2seq4repair_space>uploaded<seq2seq4repair_space>file$" ) public void i_get_the_random_uploaded_file ( ) throws Throwable { } @ When ( "^I<seq2seq4repair_space>delete<seq2seq4repair_space>the<seq2seq4repair_space>dataset$" ) public void i_delete_the_dataset ( ) throws Throwable { } private MetaDataResponse convertToMetaDataReponse ( final String jsonString ) { } private File getThumbnailFile ( ) { } @ When ( "^I<seq2seq4repair_space>upload<seq2seq4repair_space>a<seq2seq4repair_space>random<seq2seq4repair_space>file<seq2seq4repair_space>with<seq2seq4repair_space>thumbnail<seq2seq4repair_space>and<seq2seq4repair_space>metadata$" ) public void i_upload_a_random_file_with_thumbnail_and_metadata ( ) throws Throwable { GeoDataStoreApiStepdefs . logger . info ( "I<seq2seq4repair_space>upload<seq2seq4repair_space>a<seq2seq4repair_space>random<seq2seq4repair_space>file<seq2seq4repair_space>with<seq2seq4repair_space>thumbnail<seq2seq4repair_space>and<seq2seq4repair_space>metadata:<seq2seq4repair_space>{}" , uuid . toString ( ) ) ; File randomFile = getRandomFile ( ) ; testclient . addPostFile ( "dataset" , randomFile ) ; testclient . addHeader ( "Accept" , "application//json,<seq2seq4repair_space>text//javascript,<seq2seq4repair_space>*//*;<seq2seq4repair_space>q=0.01" ) ; MetaDataRequest mdrequest = new MetaDataRequest ( ) ; String jsonString ; mdrequest . setTitle ( "TEST<seq2seq4repair_space>METADATA<seq2seq4repair_space>MACHINE<seq2seq4repair_space>ONECALL" ) ; mdrequest . setSummary ( "TEST<seq2seq4repair_space>METADATA<seq2seq4repair_space>SUMMARY<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>machine<seq2seq4repair_space>one<seq2seq4repair_space>call<seq2seq4repair_space>this<seq2seq4repair_space>is<seq2seq4repair_space>the<seq2seq4repair_space>summary<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>test<seq2seq4repair_space>metadata" ) ; mdrequest . addKeyword ( "TEST" ) ; mdrequest . addKeyword ( "METADATA" ) ; mdrequest . addTopicCategorie ( "biota" ) ; mdrequest . setLocationUri ( "http:////geodatastore.pdok.nl//registry//location#Stampersgat_residence" ) ; mdrequest . setLineage ( "Bron<seq2seq4repair_space>van<seq2seq4repair_space>de<seq2seq4repair_space>gegevens<seq2seq4repair_space>is<seq2seq4repair_space>onbekend" ) ; mdrequest . setLicense ( "http:////creativecommons.org//licenses//by//3.0//nl//" ) ; mdrequest . setResolution ( 1000 ) ; JsonConverter jc = new JsonConverter ( ) ; jsonString = jc . getObjectJson ( mdrequest ) ; <START_BUG> boolean publish = false ; <END_BUG> testclient . addPostString ( "metadata" , jsonString , APPLICATION_JSON ) ; testclient . addPostString ( "publish" , Boolean . toString ( publish ) ) ; File thumbnailFile = getThumbnailFile ( ) ; testclient . addPostFile ( "thumbmail" , thumbnailFile ) ; response = testclient . sendRequest ( ( ( ( ( GeoDataStoreApiStepdefs . baseDataSetUrl ) + "?" ) + "cucumberid=" ) + ( uuid . toString ( ) ) ) , HTTPPOST ) ; Assert . assertNotNull ( response ) ; } No newline ; at end ; of file ; }

Fix:
boolean publish = true ;