private void prepareInitiatorData() throws Exception {
  String currentLabel="RPInitiator1";
  Initiator initiator=new Initiator();
  initiator.setId(URIUtil.createId(Initiator.class));
  initiator.setHostName(currentLabel);
  initiator.setInitiatorPort("PORT");
  initiator.setInitiatorNode("NODE");
  initiator.setProtocol("FC");
  initiator.setIsManualCreation(false);
  _dbClient.createObject(initiator);
  rpTestInitiatorURIs.add(initiator.getId());
  rpTestInitiators.add(initiator);
  currentLabel="RPInitiator2";
  initiator=new Initiator();
  initiator.setId(URIUtil.createId(Initiator.class));
  initiator.setHostName(currentLabel);
  initiator.setInitiatorPort("PORT");
  initiator.setInitiatorNode("NODE");
  initiator.setProtocol("FC");
  initiator.setIsManualCreation(false);
  _dbClient.createObject(initiator);
  rpTestInitiatorURIs.add(initiator.getId());
  rpTestInitiators.add(initiator);
  currentLabel="RegularInitiator1";
  initiator=new Initiator();
  initiator.setId(URIUtil.createId(Initiator.class));
  initiator.setHostName(NullColumnValueGetter.getNullStr());
  initiator.setInitiatorPort("PORT");
  initiator.setInitiatorNode("NODE");
  initiator.setProtocol("FC");
  initiator.setIsManualCreation(false);
  _dbClient.createObject(initiator);
  rpTestInitiatorURIs.add(initiator.getId());
  rpTestInitiators.add(initiator);
  currentLabel="RegularInitiator2";
  initiator=new Initiator();
  initiator.setId(URIUtil.createId(Initiator.class));
  initiator.setHostName(NullColumnValueGetter.getNullStr());
  initiator.setInitiatorPort("PORT");
  initiator.setInitiatorNode("NODE");
  initiator.setProtocol("FC");
  initiator.setIsManualCreation(false);
  _dbClient.createObject(initiator);
  rpTestInitiatorURIs.add(initiator.getId());
  rpTestInitiators.add(initiator);
  List<URI> initiatorURIs=_dbClient.queryByType(Initiator.class,false);
  int count=0;
  for (  @SuppressWarnings("unused") URI ignore : initiatorURIs) {
    count++;
  }
  Assert.assertTrue("Expected 4 Initiators, found only " + count,count == 4);
}

private void prepareInitiatorData ( ) throws Exception { String currentLabel = "RPInitiator1" ; Initiator initiator = new Initiator ( ) ; initiator . setId ( URIUtil . createId ( Initiator . class ) ) ; initiator . setHostName ( currentLabel ) ; initiator . setInitiatorPort ( "PORT" ) ; initiator . setInitiatorNode ( "NODE" ) ; initiator . setProtocol ( "FC" ) ; initiator . setIsManualCreation ( false ) ; _dbClient . createObject ( initiator ) ; rpTestInitiatorURIs . add ( initiator . getId ( ) ) ; rpTestInitiators . add ( initiator ) ; currentLabel = "RPInitiator2" ; initiator = new Initiator ( ) ; initiator . setId ( URIUtil . createId ( Initiator . class ) ) ; initiator . setHostName ( currentLabel ) ; initiator . setInitiatorPort ( "PORT" ) ; initiator . setInitiatorNode ( "NODE" ) ; initiator . setProtocol ( "FC" ) ; initiator . setIsManualCreation ( false ) ; _dbClient . createObject ( initiator ) ; rpTestInitiatorURIs . add ( initiator . getId ( ) ) ; rpTestInitiators . add ( initiator ) ; currentLabel = "RegularInitiator1" ; initiator = new Initiator ( ) ; initiator . setId ( URIUtil . createId ( Initiator . class ) ) ; initiator . setHostName ( NullColumnValueGetter . getNullStr ( ) ) ; initiator . setInitiatorPort ( "PORT" ) ; initiator . setInitiatorNode ( "NODE" ) ; initiator . setProtocol ( "FC" ) ; initiator . setIsManualCreation ( false ) ; _dbClient . createObject ( initiator ) ; rpTestInitiatorURIs . add ( initiator . getId ( ) ) ; rpTestInitiators . add ( initiator ) ; currentLabel = "RegularInitiator2" ; initiator = new Initiator ( ) ; initiator . setId ( URIUtil . createId ( Initiator . class ) ) ; initiator . setHostName ( NullColumnValueGetter . getNullStr ( ) ) ; initiator . setInitiatorPort ( "PORT" ) ; initiator . setInitiatorNode ( "NODE" ) ; initiator . setProtocol ( "FC" ) ; initiator . setIsManualCreation ( false ) ; _dbClient . createObject ( initiator ) ; rpTestInitiatorURIs . add ( initiator . getId ( ) ) ; rpTestInitiators . add ( initiator ) ; List < URI > initiatorURIs = _dbClient . queryByType ( Initiator . class , false ) ; int count = 0 ; for ( @ SuppressWarnings ( "unused" ) URI ignore : initiatorURIs ) { count ++ ; } Assert . assertTrue ( "Expected 4 Initiators, found only " + count , count == 4 ) ; }
prepares the data for volume tests .
