input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testBucketPut ( ) { byte [ ] TABLE = org . apache . hadoop . hbase . util . Bytes . toBytes ( "testBucketPut" ) ; org . apache . hadoop . hbase . client . HTable ht = org . apache . hadoop . hbase . client . TestHTableUtil . TEST_UTIL . createTable ( TABLE , org . apache . hadoop . hbase . client . TestHTableUtil . FAMILY ) ; ht . setAutoFlush ( false ) ; java . util . List < org . apache . hadoop . hbase . client . Put > puts = new java . util . ArrayList < org . apache . hadoop . hbase . client . Put > ( ) ; puts . add ( createPut ( "row1" ) ) ; puts . add ( createPut ( "row2" ) ) ; puts . add ( createPut ( "row3" ) ) ; puts . add ( createPut ( "row4" ) ) ; org . apache . hadoop . hbase . client . HTableUtil . bucketRsPut ( ht , puts ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . addColumn ( org . apache . hadoop . hbase . client . TestHTableUtil . FAMILY , org . apache . hadoop . hbase . client . TestHTableUtil . QUALIFIER ) ; int count = 0 ; for ( org . apache . hadoop . hbase . client . Result result : ht . getScanner ( scan ) ) { count ++ ; } LOG . info ( ( "bucket<sp>put<sp>count=" + count ) ) ; "<AssertPlaceHolder>" ; ht . close ( ) ; } size ( ) { if ( ( this . kvs ) == null ) { readFields ( ) ; } return ( this . kvs ) == null ? 0 : this . kvs . length ; }
org . junit . Assert . assertEquals ( count , puts . size ( ) )
shouldGetNullGraphIdsWhenNoCsvEntry ( ) { final java . util . Map < java . lang . String , java . lang . String > config = new java . util . HashMap ( ) ; config . put ( "some<sp>other<sp>key" , "some<sp>value" ) ; final java . util . List < java . lang . String > graphIds = uk . gov . gchq . gaffer . federatedstore . util . FederatedStoreUtil . getGraphIds ( config ) ; "<AssertPlaceHolder>" ; } getGraphIds ( java . util . Map ) { if ( null == config ) { return null ; } return uk . gov . gchq . gaffer . federatedstore . util . FederatedStoreUtil . getCleanStrings ( config . get ( uk . gov . gchq . gaffer . federatedstore . FederatedStoreConstants . KEY_OPERATION_OPTIONS_GRAPH_IDS ) ) ; }
org . junit . Assert . assertNull ( graphIds )
isEvictionRequired_empty ( ) { com . ibm . ws . security . authentication . internal . cache . Cache cache = new com . ibm . ws . security . authentication . internal . cache . Cache ( 0 , 12345 , 0 ) ; "<AssertPlaceHolder>" ; } isEvictionRequired ( ) { boolean evictionRequired = false ; if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . security . authentication . internal . cache . Cache . tc . isDebugEnabled ( ) ) ) { int size = ( ( primaryTable . size ( ) ) + ( secondaryTable . size ( ) ) ) + ( tertiaryTable . size ( ) ) ; com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . security . authentication . internal . cache . Cache . tc , ( ( ( ( ( ( ( ( "The<sp>current<sp>cache<sp>size<sp>is<sp>" + size ) + "(<sp>" ) + ( primaryTable . size ( ) ) ) + ",<sp>" ) + ( secondaryTable . size ( ) ) ) + ",<sp>" ) + ( tertiaryTable . size ( ) ) ) + ")" ) ) ; } if ( ( ( entryLimit ) != 0 ) && ( ( entryLimit ) != ( Integer . MAX_VALUE ) ) ) { int size = ( ( primaryTable . size ( ) ) + ( secondaryTable . size ( ) ) ) + ( tertiaryTable . size ( ) ) ; if ( size > ( entryLimit ) ) { if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . security . authentication . internal . cache . Cache . tc . isDebugEnabled ( ) ) ) com . ibm . websphere . ras . Tr . debug ( com . ibm . ws . security . authentication . internal . cache . Cache . tc , ( ( ( ( ( ( ( ( ( ( "The<sp>cache<sp>size<sp>is<sp>" + size ) + "(<sp>" ) + ( primaryTable . size ( ) ) ) + ",<sp>" ) + ( secondaryTable . size ( ) ) ) + ",<sp>" ) + ( tertiaryTable . size ( ) ) ) + ")<sp>which<sp>is<sp>greater<sp>than<sp>the<sp>cache<sp>limit<sp>of<sp>" ) + ( entryLimit ) ) + "." ) ) ; evictionRequired = true ; } } return evictionRequired ; }
org . junit . Assert . assertFalse ( cache . isEvictionRequired ( ) )
testGood_LabelWithRussian ( ) { java . lang . String moscowString = "Москва" ; java . lang . String encodedLabel = com . google . bitcoin . uri . BitcoinURI . encodeURLString ( moscowString ) ; testObject = new com . google . bitcoin . uri . BitcoinURI ( com . google . bitcoin . params . MainNetParams . get ( ) , ( ( ( ( ( BitcoinURI . BITCOIN_SCHEME ) + ":" ) + ( com . google . bitcoin . uri . BitcoinURITest . MAINNET_GOOD_ADDRESS ) ) + "?label=" ) + encodedLabel ) ) ; "<AssertPlaceHolder>" ; } getLabel ( ) { return ( ( java . lang . String ) ( parameterMap . get ( com . google . bitcoin . uri . BitcoinURI . FIELD_LABEL ) ) ) ; }
org . junit . Assert . assertEquals ( moscowString , testObject . getLabel ( ) )
getDatabaseInfo_unknown ( ) { com . navercorp . pinpoint . bootstrap . context . DatabaseInfo databaseInfo = com . navercorp . pinpoint . plugin . mongo . interceptor . DatabaseInfoUtils . getDatabaseInfo ( new java . lang . Object ( ) , UnKnownDatabaseInfo . MONGO_INSTANCE ) ; "<AssertPlaceHolder>" ; } getDatabaseInfo ( java . lang . Object , com . navercorp . pinpoint . bootstrap . context . DatabaseInfo ) { if ( target instanceof com . navercorp . pinpoint . bootstrap . plugin . jdbc . DatabaseInfoAccessor ) { final com . navercorp . pinpoint . bootstrap . context . DatabaseInfo databaseInfo = ( ( com . navercorp . pinpoint . bootstrap . plugin . jdbc . DatabaseInfoAccessor ) ( target ) ) . _$PINPOINT$_getDatabaseInfo ( ) ; if ( databaseInfo != null ) { return databaseInfo ; } } return defaultDatabaseInfo ; }
org . junit . Assert . assertEquals ( databaseInfo , UnKnownDatabaseInfo . MONGO_INSTANCE )
off ( ) { io . socket . emitter . Emitter emitter = new io . socket . emitter . Emitter ( ) ; final java . util . List < java . lang . Object > calls = new java . util . ArrayList < java . lang . Object > ( ) ; io . socket . emitter . Emitter . Listener one = new io . socket . emitter . Emitter . Listener ( ) { @ io . socket . emitter . Override public void call ( java . lang . Object ... args ) { calls . add ( "one" ) ; } } ; io . socket . emitter . Emitter . Listener two = new io . socket . emitter . Emitter . Listener ( ) { @ io . socket . emitter . Override public void call ( java . lang . Object ... args ) { calls . add ( "two" ) ; } } ; emitter . on ( "foo" , one ) ; emitter . on ( "foo" , two ) ; emitter . off ( "foo" , two ) ; emitter . emit ( "foo" ) ; "<AssertPlaceHolder>" ; } off ( java . lang . String , io . socket . emitter . Emitter$Listener ) { java . util . concurrent . ConcurrentLinkedQueue < io . socket . emitter . Emitter . Listener > callbacks = this . callbacks . get ( event ) ; if ( callbacks != null ) { java . util . Iterator < io . socket . emitter . Emitter . Listener > it = callbacks . iterator ( ) ; while ( it . hasNext ( ) ) { io . socket . emitter . Emitter . Listener internal = it . next ( ) ; if ( io . socket . emitter . Emitter . sameAs ( fn , internal ) ) { it . remove ( ) ; break ; } } } return this ; }
org . junit . Assert . assertThat ( calls . toArray ( ) , org . hamcrest . CoreMatchers . is ( new java . lang . Object [ ] { "one" } ) )
testGetStartProcessByUserId ( ) { jdbcTemplate . execute ( "insert<sp>into<sp>au_userInfo(userId,USERNAME)<sp>VALUES<sp>('test_admin3','3')" ) ; java . util . List < org . foxbpm . engine . repository . ProcessDefinition > result = modelService . getStartProcessByUserId ( "test_admin3" ) ; "<AssertPlaceHolder>" ; } getStartProcessByUserId ( java . lang . String ) { return commandExecutor . execute ( new org . foxbpm . engine . impl . cmd . GetStartProcessByUserIdCmd ( userId ) ) ; }
org . junit . Assert . assertTrue ( ( ! ( result . isEmpty ( ) ) ) )
testJAXBCB_Server2 ( ) { TestLogger . logger . debug ( "------------------------------" ) ; java . lang . String reqString = "JAXBCustomBuilderServer2" ; org . apache . axis2 . jaxws . sample . wrap . sei . DocLitWrap proxy = getProxy ( ) ; proxy . twoWay ( "JAXBCustomBuilderMonitorStart" ) ; java . lang . String response = proxy . twoWay ( reqString ) ; TestLogger . logger . debug ( ( "Response<sp>1<sp>=" + response ) ) ; java . lang . Integer r1 = java . lang . Integer . parseInt ( response ) ; java . lang . String response2 = proxy . twoWay ( reqString ) ; TestLogger . logger . debug ( ( "Response<sp>2<sp>=" + response2 ) ) ; java . lang . Integer r2 = java . lang . Integer . parseInt ( response2 ) ; "<AssertPlaceHolder>" ; TestLogger . logger . debug ( "------------------------------" ) ; proxy . twoWay ( "JAXBCustomBuilderMonitorEnd" ) ; } intValue ( ) { return lValue . intValue ( ) ; }
org . junit . Assert . assertTrue ( ( ( r2 . intValue ( ) ) > ( r1 . intValue ( ) ) ) )
testExecuteWithoutUserAccountId ( ) { org . eurekastreams . server . domain . PagedSet < org . eurekastreams . server . domain . stream . ActivityDTO > flaggedActivities = sut . execute ( new org . eurekastreams . server . action . request . stream . GetFlaggedActivitiesRequest ( 0 , 9 ) ) ; "<AssertPlaceHolder>" ; } getPagedSet ( ) { return pagedSet ; }
org . junit . Assert . assertEquals ( 1 , flaggedActivities . getPagedSet ( ) . size ( ) )
legacyCompatible ( ) { java . lang . String test = "secret" ; java . lang . String hashedString = org . apache . commons . codec . digest . DigestUtils . md5Hex ( test . getBytes ( "UTF-8" ) ) ; byte [ ] hashedStringBytes = hashedString . getBytes ( "UTF-8" ) ; org . apache . usergrid . security . crypto . command . Md5HashCommand command = new org . apache . usergrid . security . crypto . command . Md5HashCommand ( ) ; org . apache . usergrid . persistence . CredentialsInfo info = new org . apache . usergrid . persistence . CredentialsInfo ( ) ; byte [ ] results = command . hash ( test . getBytes ( "UTF-8" ) , info , null , null ) ; "<AssertPlaceHolder>" ; } hash ( byte [ ] , org . apache . usergrid . persistence . CredentialsInfo , java . util . UUID , java . util . UUID ) { byte [ ] data = maybeSalt ( input , applicationId , userId ) ; return org . apache . commons . codec . digest . DigestUtils . md5Hex ( data ) . getBytes ( org . apache . usergrid . security . crypto . command . UTF8 ) ; }
org . junit . Assert . assertArrayEquals ( hashedStringBytes , results )
testDisconnectedCallbackAfterClientDropsConnection ( ) { final java . lang . String name = "dummy" ; com . sun . sgs . test . impl . service . session . TestClientSessionServiceImplv4 . DummyClient client = createDummyClient ( name ) ; try { client . connect ( serverNode . getAppPort ( ) ) ; "<AssertPlaceHolder>" ; checkBindings ( 1 ) ; client . disconnect ( ) ; client . checkDisconnectedCallback ( false ) ; checkBindings ( 0 ) ; txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) { try { dataService . getBinding ( name ) ; org . junit . Assert . fail ( ( "expected<sp>ObjectNotFoundException:<sp>" + "object<sp>not<sp>removed" ) ) ; } catch ( com . sun . sgs . app . ObjectNotFoundException e ) { } } } , taskOwner ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( "testLogout<sp>interrupted" ) ; } finally { client . disconnect ( ) ; } } login ( ) { return login ( true ) ; }
org . junit . Assert . assertTrue ( client . login ( ) )
lineContinuation ( ) { java . util . Map < java . lang . String , java . lang . String > actual = io . strimzi . operator . cluster . model . OrderedPropertiesTest . propertiesCompatibility ( "cr:split\\\rvalue\nnl:split\\\nvalue\ncrnl:split\\\r\nvalue\nno:split" ) ; io . strimzi . operator . cluster . model . OrderedProperties expected = new io . strimzi . operator . cluster . model . OrderedProperties ( ) . addPair ( "cr" , "splitvalue" ) . addPair ( "nl" , "splitvalue" ) . addPair ( "crnl" , "splitvalue" ) . addPair ( "no" , "split" ) ; "<AssertPlaceHolder>" ; } asMap ( ) { return pairs ; }
org . junit . Assert . assertEquals ( expected . asMap ( ) , actual )
testConstructors ( ) { gov . sandia . cognition . learning . algorithm . baseline . IdentityLearner < java . lang . String > instance = new gov . sandia . cognition . learning . algorithm . baseline . IdentityLearner < java . lang . String > ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( instance )
process_lock_2 ( ) { org . apache . jena . dboe . base . file . ProcessFileLock lock1 = org . apache . jena . dboe . base . file . ProcessFileLock . create ( lockfile ) ; org . apache . jena . dboe . base . file . ProcessFileLock lock2 = org . apache . jena . dboe . base . file . ProcessFileLock . create ( lockfile ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String ) { try { java . nio . file . Path abspath = java . nio . file . Paths . get ( filename ) . toRealPath ( ) ; return org . apache . jena . dboe . base . file . ProcessFileLock . locks . computeIfAbsent ( abspath , org . apache . jena . dboe . base . file . ProcessFileLock :: new ) ; } catch ( java . io . IOException e ) { org . apache . jena . atlas . io . IO . exception ( e ) ; return null ; } }
org . junit . Assert . assertSame ( lock1 , lock2 )
testJmsConnectionIdFromJmsSessionId ( ) { org . apache . qpid . jms . meta . JmsSessionId id1 = new org . apache . qpid . jms . meta . JmsSessionId ( firstId , 1 ) ; org . apache . qpid . jms . meta . JmsSessionId id2 = new org . apache . qpid . jms . meta . JmsSessionId ( id1 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertSame ( id1 . getValue ( ) , id2 . getValue ( ) )
testLockAndLoadSingleEntityByIdRevertsUnflushedMerge ( ) { org . candlepin . model . Owner owner = this . createOwner ( "owner_key-1" , "owner-1" ) ; owner . setDisplayName ( "changed_name" ) ; testOwnerCurator . merge ( owner ) ; this . testOwnerCurator . lockAndLoadById ( owner . getId ( ) ) ; "<AssertPlaceHolder>" ; } getDisplayName ( ) { return this . displayName ; }
org . junit . Assert . assertEquals ( "owner-1" , owner . getDisplayName ( ) )
testToString ( ) { java . lang . String expectedString = org . apache . commons . lang . StringUtils . join ( new java . lang . String [ ] { "[packetId=packet_id" , "nodeId=node_id" , "portId=port_id" , "data={1}" , "attributes={packet_id=123456}" , "123456" 0 } , "," ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( result . contains ( expectedString ) , org . hamcrest . CoreMatchers . is ( true ) )
testGetProjectByIdUser2_2 ( ) { org . eclipse . sw360 . datahandler . thrift . projects . Project project2 = handler . getProjectById ( "P2" , org . eclipse . sw360 . projects . ProjectHandlerTest . user2 ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( "P2" , project2 . getId ( ) )
canConvertJsonToPath ( ) { java . lang . Class < java . nio . file . Path > clazz = java . nio . file . Path . class ; org . springframework . http . MediaType mediaType = org . springframework . http . MediaType . APPLICATION_JSON ; "<AssertPlaceHolder>" ; } canRead ( java . lang . Class , org . springframework . http . MediaType ) { ca . corefacility . bioinformatics . irida . repositories . remote . resttemplate . SequenceFileMessageConverter . logger . trace ( ( ( ( "Testing<sp>converter<sp>for<sp>class<sp>" + ( clazz . getName ( ) ) ) + "<sp>and<sp>mediatype<sp>" ) + mediaType ) ) ; if ( ( ( mediaType != null ) && ( ca . corefacility . bioinformatics . irida . repositories . remote . resttemplate . SequenceFileMessageConverter . MEDIA_TYPE . includes ( mediaType ) ) ) && ( clazz . equals ( java . nio . file . Path . class ) ) ) { ca . corefacility . bioinformatics . irida . repositories . remote . resttemplate . SequenceFileMessageConverter . logger . trace ( "SequenceFileMessageConverter<sp>can<sp>read<sp>this<sp>message" ) ; return true ; } return false ; }
org . junit . Assert . assertFalse ( converter . canRead ( clazz , mediaType ) )
testGetCurrentResultIllegalAccessException ( ) { java . lang . reflect . Field resultSetRowField = com . pentaho . big . data . bundles . impl . shim . hbase . HBaseConnectionWrapper . getResultSetRowField ( hBaseConnectionWrapper . getRealImpl ( ) ) ; org . apache . hadoop . hbase . client . Result result = mock ( org . apache . hadoop . hbase . client . Result . class ) ; resultSetRowField . setAccessible ( true ) ; resultSetRowField . set ( hBaseConnectionWrapper . getRealImpl ( ) , result ) ; resultSetRowField = hBaseConnectionWrapper . getResultSetRowField ( ) ; try { resultSetRowField . setAccessible ( false ) ; "<AssertPlaceHolder>" ; } finally { resultSetRowField . setAccessible ( true ) ; } } getCurrentResult ( ) { try { return ( ( org . apache . hadoop . hbase . client . Result ) ( resultSetRowField . get ( realImpl ) ) ) ; } catch ( java . lang . IllegalAccessException e ) { return null ; } }
org . junit . Assert . assertNull ( hBaseConnectionWrapper . getCurrentResult ( ) )
parseIotHubName_good_case_multi_separator ( ) { java . lang . String iotHubName = "IOTHUBNAME" ; java . lang . String iotHostName = "HOSTNAME.POSTFIX1.POSTFIX2" ; java . lang . String sharedAccessKeyName = "ACCESSKEYNAME" ; java . lang . String policyName = "HostName=" 2 ; java . lang . String sharedAccessKey = "1234567890abcdefghijklmnopqrstvwxyz=" ; java . lang . String connectionString = ( ( ( ( ( ( ( ( "HostName=" + iotHubName ) + "HostName=" 1 ) + iotHostName ) + ";SharedAccessKeyName=" ) + sharedAccessKeyName ) + ";" ) + policyName ) + "=" ) + sharedAccessKey ; java . lang . String userString = ( sharedAccessKeyName + "@SAS.root." ) + iotHubName ; tests . unit . com . microsoft . azure . sdk . iot . service . IotHubConnectionString iotHubConnectionString = tests . unit . com . microsoft . azure . sdk . iot . service . IotHubConnectionStringBuilder . createConnectionString ( connectionString ) ; java . lang . String expected = iotHubName ; java . lang . String actual = mockit . Deencapsulation . invoke ( iotHubConnectionString , "parseIotHubName" , iotHubConnectionString ) ; "<AssertPlaceHolder>" ; } createConnectionString ( java . lang . String ) { if ( com . microsoft . azure . sdk . iot . service . Tools . isNullOrEmpty ( connectionString ) ) { throw new java . lang . IllegalArgumentException ( "connection<sp>string<sp>cannotbe<sp>null<sp>or<sp>empty" ) ; } com . microsoft . azure . sdk . iot . service . IotHubConnectionString iotHubConnectionString = new com . microsoft . azure . sdk . iot . service . IotHubConnectionString ( ) ; com . microsoft . azure . sdk . iot . service . IotHubConnectionStringBuilder . parse ( connectionString , iotHubConnectionString ) ; return iotHubConnectionString ; }
org . junit . Assert . assertEquals ( "HostName=" 0 , expected , actual )
testSoftmax ( ) { org . nd4j . linalg . api . ndarray . INDArray vec = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 18 , 18 , DataType . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray matrix = vec . dup ( ) . reshape ( 3 , 6 ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . transforms . strict . OldSoftMax ( matrix ) ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.0042697787 , 0.011606461 , 0.031549633 , 0.085760795 , 0.23312202 , 0.6336913 , 0.0042697787 , 0.011606461 , 0.031549633 , 0.085760795 , 0.23312202 , 0.6336913 , 0.0042697787 , 0.011606461 , 0.031549633 , 0.085760795 , 0.23312202 , 0.6336913 } , new int [ ] { 3 , 6 } , 'c' ) ; "<AssertPlaceHolder>" ; } exec ( java . lang . String ) { code = org . datavec . python . PythonExecutioner . getFunctionalCode ( ( "__f_" + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ) , code ) ; org . datavec . python . PythonExecutioner . acquireGIL ( ) ; log . info ( "CPython:<sp>PyRun_SimpleStringFlag()" ) ; log . info ( code ) ; int result = PyRun_SimpleStringFlags ( code , null ) ; if ( result != 0 ) { PyErr_Print ( ) ; throw new java . lang . RuntimeException ( "exec<sp>failed" ) ; } log . info ( "Exec<sp>done" ) ; org . datavec . python . PythonExecutioner . releaseGIL ( ) ; }
org . junit . Assert . assertEquals ( assertion , matrix )
testStepUp ( ) { sliderView . update ( 10 ) ; sliderView . valueChanged ( 0.1F ) ; replay ( sliderView ) ; bindToView ( ) ; slider . stepUp ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return sliderImpl . getValue ( ) ; }
org . junit . Assert . assertEquals ( 0.1F , slider . getValue ( ) )
testUndelete_AttributesNotDeleted ( ) { when ( attributes . isDeleted ( ) ) . thenReturn ( false ) ; boolean result = underTest . undelete ( blobStoreUsageChecker , new org . sonatype . nexus . blobstore . api . BlobId ( "fakeid" ) , attributes , false ) ; "<AssertPlaceHolder>" ; verify ( blobStoreUsageChecker , never ( ) ) . test ( eq ( underTest ) , any ( org . sonatype . nexus . blobstore . api . BlobId . class ) , anyString ( ) ) ; } is ( java . lang . String ) { return org . sonatype . nexus . rapture . PasswordPlaceholder . VALUE . equals ( value ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( false ) )
extendExisting ( ) { final int [ ] expected = new int [ ] { 1 , 2 , 3 , 4 , 5 } ; final org . ops4j . pax . exam . karaf . container . internal . KarafConfigFile karafConfigFile = new org . ops4j . pax . exam . karaf . container . internal . KarafConfigFile ( org . ops4j . pax . exam . karaf . container . internal . KarafConfigFileTest . KARAF_ETC , "etc/ints_4.config" ) ; karafConfigFile . load ( ) ; karafConfigFile . extend ( "ints" , 5 ) ; final int [ ] ints = ( ( int [ ] ) ( karafConfigFile . get ( "ints" ) ) ) ; "<AssertPlaceHolder>" ; } get ( org . ops4j . pax . exam . container . eclipse . EclipseVersionedArtifact ) { return get ( bundle . getId ( ) , bundle . getVersion ( ) ) ; }
org . junit . Assert . assertArrayEquals ( expected , ints )
testBatches ( ) { final weka . core . Instances data = weka . util . DatasetLoader . loadAngerMeta ( ) ; final int seed = 1 ; for ( int batchSize : new int [ ] { 1 , 2 , 5 , 10 } ) { final int actual = countIterations ( data , cteii , seed , batchSize ) ; final int expected = ( ( int ) ( java . lang . Math . ceil ( ( ( data . numInstances ( ) ) / ( ( double ) ( batchSize ) ) ) ) ) ) ; "<AssertPlaceHolder>" ; } } countIterations ( weka . core . Instances , weka . dl4j . iterators . instance . AbstractInstanceIterator , int , int ) { org . nd4j . linalg . dataset . api . iterator . DataSetIterator it = iter . getDataSetIterator ( data , seed , batchsize ) ; int count = 0 ; while ( it . hasNext ( ) ) { count ++ ; it . next ( ) ; } return count ; }
org . junit . Assert . assertEquals ( expected , actual )
testCleanupCurrentUser_NonOnBehalfUser ( ) { idService . cleanUpCurrentUser ( ) ; org . oscm . identityservice . bean . PlatformUser user = getDomainObject ( supplierAdminUser , org . oscm . identityservice . bean . PlatformUser . class ) ; "<AssertPlaceHolder>" ; } cleanUpCurrentUser ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertNotNull ( user )
MathML_html ( ) { gov . uspto . patent . doc . xml . FormattedText format = new gov . uspto . patent . doc . xml . FormattedText ( ) ; java . lang . StringBuilder stb = new java . lang . StringBuilder ( ) ; stb . append ( "<p<sp>id=\"h-1\"<p><maths>" 1 ) ; stb . append ( "<p><maths>" ) ; stb . append ( "<math><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mrow><mn>4</mn><mo>+</mo><mi>x</mi></mrow><mo>+</mo><mn>4</mn></mrow><mo>=</mo><mn>0</mn></mrow></math>" ) ; stb . append ( "</maths></p>" ) ; java . lang . StringBuilder expectStb = new java . lang . StringBuilder ( ) ; expectStb . append ( "<h4<sp>id=\"h-1\">SECTION<sp>TITLE</h4>" ) ; expectStb . append ( "<p><span<sp>id=\"MTH-0001\"<sp>class=\"math\"<sp>format=\"mathml\"<p><maths>" 0 ) ; expectStb . append ( "<math><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mrow><mn>4</mn><mo>+</mo><mi>x</mi></mrow><mo>+</mo><mn>4</mn></mrow><mo>=</mo><mn>0</mn></mrow></math></span></p>" ) ; java . lang . String expect = expectStb . toString ( ) ; java . lang . String actual = format . getSimpleHtml ( stb . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "NameDateRangeFileFilter<sp>[dateRange=" + ( dateRange ) ) + ",<sp>nameDateRegexs=" ) + ( nameDateRegexs ) ) + "]" ; }
org . junit . Assert . assertEquals ( expect , actual )
testCompleteBuffer ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "lexer<sp>grammar<sp>t;\n" + ( ( ( ( ( ( "ID<sp>:<sp>\'a\'..\'z\'+;\n" + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "SEMI<sp>:<sp>\';\';\n" ) + "ASSIGN<sp>:<sp>\'=\';\n" ) + "PLUS<sp>:<sp>\'+\';\n" ) + "MULT<sp>:<sp>\'*\';\n" ) + "WS<sp>:<sp>\'<sp>\'+;\n" ) ) ) ; org . antlr . test . CharStream input = new org . antlr . test . ANTLRStringStream ( "x<sp>=<sp>3<sp>*<sp>0<sp>+<sp>2<sp>*<sp>0;" ) ; org . antlr . tool . Interpreter lexEngine = new org . antlr . tool . Interpreter ( g , input ) ; org . antlr . test . BufferedTokenStream tokens = new org . antlr . test . BufferedTokenStream ( lexEngine ) ; int i = 1 ; org . antlr . test . Token t = tokens . LT ( i ) ; while ( ( t . getType ( ) ) != ( Token . EOF ) ) { i ++ ; t = tokens . LT ( i ) ; } tokens . LT ( ( i ++ ) ) ; tokens . LT ( ( i ++ ) ) ; java . lang . String result = tokens . toString ( ) ; java . lang . String expecting = "x<sp>=<sp>3<sp>*<sp>0<sp>+<sp>2<sp>*<sp>0;" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( "[" + ( grammar . name ) ) + "." ) + ( name ) ) + ",index=" ) + ( index ) ) + ",line=" ) + ( tree . getToken ( ) . getLine ( ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( expecting , result )
testEscapedPasswordAllClean ( ) { java . lang . String password = "hello" ; java . lang . String actual = org . irods . jargon . core . utils . MiscIRODSUtils . escapePasswordChars ( password ) ; "<AssertPlaceHolder>" ; } escapePasswordChars ( java . lang . String ) { if ( ( password == null ) || ( password . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>password" ) ; } java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; char [ ] chars = password . toCharArray ( ) ; for ( char c : chars ) { if ( ( ( ( c == '@' ) || ( c == '=' ) ) || ( c == '&' ) ) || ( c == ';' ) ) { sb . append ( '\\' ) ; } sb . append ( c ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( password , actual )
testReadWriteOneVar ( ) { edu . jhu . pacaya . gm . model . FactorGraph fg = edu . jhu . pacaya . gm . data . LibDaiFgIoTest . readFromString ( oneVarFg ) ; java . lang . String fgfile = edu . jhu . pacaya . gm . data . LibDaiFgIoTest . writeToString ( fg ) ; System . out . println ( fgfile ) ; "<AssertPlaceHolder>" ; } writeToString ( edu . jhu . pacaya . gm . model . FactorGraph ) { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . BufferedWriter out = new java . io . BufferedWriter ( new java . io . OutputStreamWriter ( bos ) ) ; edu . jhu . pacaya . gm . data . LibDaiFgIo . write ( fg , out ) ; java . lang . String fgfile = bos . toString ( ) ; System . out . println ( fgfile ) ; return fgfile ; }
org . junit . Assert . assertEquals ( oneVarFg , fgfile )
bodyStringShouldBeParsed ( ) { byte [ ] bytes = new byte [ ] { 'a' , 'b' , 'c' } ; java . lang . String bytesString = new java . lang . String ( bytes ) ; com . android . volley . NetworkResponse response = new com . android . volley . NetworkResponse ( bytes ) ; com . navercorp . volleyextensions . request . AbstractConverterRequestTest . ConcreteConverterRequest < com . navercorp . volleyextensions . request . AbstractConverterRequestTest . TestClass > request = createConcreteClassInstance ( url , clazz , listener ) ; java . lang . String bodyString = null ; try { bodyString = request . getBodyStringExternal ( response ) ; } catch ( java . io . UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( object instanceof com . navercorp . volleyextensions . volleyer . http . ContentType ) == false ) { return false ; } com . navercorp . volleyextensions . volleyer . http . ContentType otherContentType = ( ( com . navercorp . volleyextensions . volleyer . http . ContentType ) ( object ) ) ; if ( ( this ) == otherContentType ) { return true ; } if ( contentTypeString . equals ( otherContentType . contentTypeString ) ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( bytesString . equals ( bodyString ) )
testDeleteBankAccount ( ) { com . balancedpayments . BankAccount bankAccount = new com . balancedpayments . BankAccount ( ) ; bankAccount . name = "Harry<sp>Fakester" ; bankAccount . routing_number = "121042882" ; bankAccount . account_number = "112233a" ; bankAccount . account_type = "checking" ; bankAccount . save ( ) ; "<AssertPlaceHolder>" ; java . lang . String href = bankAccount . href ; bankAccount . unstore ( ) ; } save ( ) { if ( ( ( id ) == null ) && ( ( href ) == null ) ) href = com . balancedpayments . Debit . resource_href ; super . save ( ) ; }
org . junit . Assert . assertNotNull ( bankAccount . href )
idShouldHaveBeenSetByDB ( ) { no . kodemaker . ps . jdbiapp . repository . PersonDaoFluentStyleTest . dao . save ( new no . kodemaker . ps . jdbiapp . domain . Person ( "John<sp>Doe" , new no . kodemaker . ps . jdbiapp . domain . Email ( "john.doe@nomail.com" ) ) ) ; no . kodemaker . ps . jdbiapp . domain . Person p = no . kodemaker . ps . jdbiapp . repository . PersonDaoFluentStyleTest . dao . findByName ( "John<sp>Doe" ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( p . getId ( ) ) != null ) )
testByteMath ( ) { byte expected = org . stjs . generator . exec . ints . ByteMath . sum ( ByteMath . B1 , ByteMath . B2 ) ; double expectedDouble = ( ( double ) ( expected ) ) ; "<AssertPlaceHolder>" ; } executeAndReturnNumber ( java . lang . Class ) { return executeAndReturnNumber ( clazz , null ) ; }
org . junit . Assert . assertEquals ( expectedDouble , executeAndReturnNumber ( org . stjs . generator . exec . ints . ByteMath . class ) , 0 )
testSearchUserLimit ( ) { org . junit . Assume . assumeTrue ( "No<sp>multiple<sp>fulltext<sp>indexes" , coreFeature . getStorageConfiguration ( ) . supportsMultipleFulltextIndexes ( ) ) ; org . nuxeo . runtime . api . Framework . doPrivileged ( ( ) -> { try ( org . nuxeo . ecm . directory . Session userSession = userdir . getSession ( ) ) { for ( int i = 0 ; i < 10 ; i ++ ) { Map < java . lang . String , java . lang . Object > user = new HashMap < java . lang . String , java . lang . Object > ( ) ; user . put ( "username" , java . lang . String . format ( "user%d" , i ) ) ; user . put ( "firstName" , "Nemo" ) ; user . put ( "lastName" , "Homonym" ) ; userSession . createEntry ( user ) ; } } } ) ; org . nuxeo . ecm . core . api . NuxeoPrincipal admin = session . getPrincipal ( ) ; java . util . Map < java . lang . String , java . lang . String > messages = getTestMessages ( ) ; org . nuxeo . ecm . platform . suggestbox . service . SuggestionContext context = new org . nuxeo . ecm . platform . suggestbox . service . SuggestionContext ( "searchbox" , admin ) . withLocale ( Locale . US ) . withSession ( session ) . withMessages ( messages ) ; int count = 0 ; java . util . List < org . nuxeo . ecm . platform . suggestbox . service . Suggestion > suggestions = suggestionService . suggest ( "homonym" , context ) ; for ( org . nuxeo . ecm . platform . suggestbox . service . Suggestion suggestion : suggestions ) { if ( "user" . equals ( suggestion . getType ( ) ) ) { count ++ ; } } "<AssertPlaceHolder>" ; } getType ( ) { return type ; }
org . junit . Assert . assertEquals ( 5 , count )
testGetName ( ) { constraint . setName ( "not<sp>null" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertNotNull ( constraint . getName ( ) )
testMerge ( ) { populateQuotes ( ) ; com . questdb . std . ObjList < com . questdb . store . Journal < com . questdb . model . Quote > > journals = new com . questdb . std . ObjList < com . questdb . store . Journal < com . questdb . model . Quote > > ( ) { { add ( getFactory ( ) . reader ( com . questdb . model . Quote . class , "quote-0" ) ) ; add ( getFactory ( ) . reader ( com . questdb . model . Quote . class , "quote-1" ) ) ; add ( getFactory ( ) . reader ( com . questdb . model . Quote . class , "quote-2" ) ) ; add ( getFactory ( ) . reader ( com . questdb . model . Quote . class , "quote-3" ) ) ; add ( getFactory ( ) . reader ( com . questdb . model . Quote . class , "quote-4" ) ) ; } } ; try { java . util . List < com . questdb . store . JournalIterator < com . questdb . model . Quote > > list = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( journals . size ( ) ) ; i ++ ) { list . add ( com . questdb . store . JournalIterators . bufferedIterator ( journals . get ( i ) ) ) ; } long ts = 0 ; for ( com . questdb . model . Quote q : com . questdb . store . MergingIterator . merge ( list , comparator ) ) { "<AssertPlaceHolder>" ; ts = q . getTimestamp ( ) ; } } finally { for ( int i = 0 , n = journals . size ( ) ; i < n ; i ++ ) { journals . getQuick ( i ) . close ( ) ; } } } getTimestamp ( ) { return timestamp ; }
org . junit . Assert . assertTrue ( ( ts <= ( q . getTimestamp ( ) ) ) )
isSet_withUnknown ( ) { org . slf4j . MDC . put ( org . sonatype . nexus . security . UserIdMdcHelper . KEY , org . sonatype . nexus . security . UserIdHelper . UNKNOWN ) ; "<AssertPlaceHolder>" ; } isSet ( ) { org . slf4j . MDC . put ( org . sonatype . nexus . security . UserIdMdcHelper . KEY , "test" ) ; org . junit . Assert . assertThat ( org . sonatype . nexus . security . UserIdMdcHelper . isSet ( ) , org . hamcrest . Matchers . is ( true ) ) ; }
org . junit . Assert . assertThat ( org . sonatype . nexus . security . UserIdMdcHelper . isSet ( ) , org . hamcrest . Matchers . is ( false ) )
testLowerCaseAlphaKeys ( ) { driver . get ( pages . javascriptPage ) ; org . openqa . selenium . WebElement element = driver . findElement ( org . openqa . selenium . By . id ( "keyReporter" ) ) ; java . lang . String lowerAlphas = "abcdefghijklmnopqrstuvwxyz" ; element . sendKeys ( lowerAlphas ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return commandProcessor . getString ( "getAttribute" , new java . lang . String [ ] { attributeLocator } ) ; }
org . junit . Assert . assertThat ( element . getAttribute ( "value" ) , org . hamcrest . Matchers . is ( lowerAlphas ) )
testSerialization ( ) { org . jfree . chart . renderer . xy . XYStepRenderer r1 = new org . jfree . chart . renderer . xy . XYStepRenderer ( ) ; r1 . setStepPoint ( 0.123 ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( r1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . renderer . xy . XYStepRenderer r2 = ( ( org . jfree . chart . renderer . xy . XYStepRenderer ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( r1 , r2 )
testIsSubProject ( ) { java . io . File build = root . newFile ( "build.gradle" ) ; java . io . File settings = root . newFile ( "settings.gradle" ) ; java . io . File module = root . newFolder ( "module" ) ; java . nio . file . Files . write ( settings . toPath ( ) , java . util . Arrays . asList ( "include<sp>':module'" ) ) ; org . netbeans . modules . gradle . spi . GradleFiles gf = new org . netbeans . modules . gradle . spi . GradleFiles ( module ) ; "<AssertPlaceHolder>" ; } isSubProject ( ) { return ( isProject ( ) ) && ( ! ( isRootProject ( ) ) ) ; }
org . junit . Assert . assertTrue ( gf . isSubProject ( ) )
testGetStatusCode ( ) { int expResult = 500 ; int result = instance . getStatusCode ( ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return statusCode ; }
org . junit . Assert . assertEquals ( expResult , result )
equals_refreshPeriodDifferent_returnsFalse ( ) { com . amazonaws . services . dynamodbv2 . AcquireLockOptions left = createLockOptions ( ) ; com . amazonaws . services . dynamodbv2 . AcquireLockOptions right = com . amazonaws . services . dynamodbv2 . AcquireLockOptions . builder ( "partitionKey" ) . withSortKey ( "sortKey" ) . withData ( java . nio . ByteBuffer . wrap ( "data" . getBytes ( ) ) ) . withReplaceData ( true ) . withDeleteLockOnRelease ( true ) . withAcquireOnlyIfLockAlreadyExists ( false ) . withRefreshPeriod ( 2L ) . withAdditionalTimeToWaitForLock ( 1L ) . withTimeUnit ( TimeUnit . MILLISECONDS ) . withAdditionalAttributes ( new java . util . HashMap ( ) ) . withUpdateExistingLockRecord ( false ) . withAcquireReleasedLocksConsistently ( false ) . build ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( other == null ) || ( ! ( other instanceof com . amazonaws . services . dynamodbv2 . AcquireLockOptions ) ) ) { return false ; } final com . amazonaws . services . dynamodbv2 . AcquireLockOptions otherOptions = ( ( com . amazonaws . services . dynamodbv2 . AcquireLockOptions ) ( other ) ) ; return ( ( ( ( ( ( ( ( ( ( ( ( ( java . util . Objects . equals ( this . partitionKey , otherOptions . partitionKey ) ) && ( java . util . Objects . equals ( this . sortKey , otherOptions . sortKey ) ) ) && ( java . util . Objects . equals ( this . data , otherOptions . data ) ) ) && ( java . util . Objects . equals ( this . replaceData , otherOptions . replaceData ) ) ) && ( java . util . Objects . equals ( this . deleteLockOnRelease , otherOptions . deleteLockOnRelease ) ) ) && ( java . util . Objects . equals ( this . acquireOnlyIfLockAlreadyExists , otherOptions . acquireOnlyIfLockAlreadyExists ) ) ) && ( java . util . Objects . equals ( this . refreshPeriod , otherOptions . refreshPeriod ) ) ) && ( java . util . Objects . equals ( this . additionalTimeToWaitForLock , otherOptions . additionalTimeToWaitForLock ) ) ) && ( java . util . Objects . equals ( this . timeUnit , otherOptions . timeUnit ) ) ) && ( java . util . Objects . equals ( this . additionalAttributes , otherOptions . additionalAttributes ) ) ) && ( java . util . Objects . equals ( this . sessionMonitor , otherOptions . sessionMonitor ) ) ) && ( java . util . Objects . equals ( this . updateExistingLockRecord , otherOptions . updateExistingLockRecord ) ) ) && ( java . util . Objects . equals ( this . shouldSkipBlockingWait , otherOptions . shouldSkipBlockingWait ) ) ) && ( java . util . Objects . equals ( this . acquireReleasedLocksConsistently , otherOptions . acquireReleasedLocksConsistently ) ) ; }
org . junit . Assert . assertFalse ( left . equals ( right ) )
testToDatastore_9 ( ) { float f = - ( Float . MIN_VALUE ) ; com . jmethods . catatumbo . mappers . FloatMapper mapper = new com . jmethods . catatumbo . mappers . FloatMapper ( ) ; com . google . cloud . datastore . Value output = mapper . toDatastore ( f ) . build ( ) ; System . out . printf ( "%s<sp>---><sp>%s%n" , f , output . get ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( obj == null ) || ( ! ( obj instanceof com . jmethods . catatumbo . entities . StringSetIndex ) ) ) { return false ; } if ( ( this ) == obj ) { return true ; } com . jmethods . catatumbo . entities . StringSetIndex that = ( ( com . jmethods . catatumbo . entities . StringSetIndex ) ( obj ) ) ; return ( ( ( this . id ) == ( that . id ) ) && ( java . util . Objects . equals ( this . colors , that . colors ) ) ) && ( java . util . Objects . equals ( this . sizes , that . sizes ) ) ; }
org . junit . Assert . assertTrue ( java . lang . Double . valueOf ( f ) . equals ( output . get ( ) ) )
testGetQuery ( ) { org . biojava3 . alignment . template . ProfilePair < org . biojava3 . core . sequence . ProteinSequence , org . biojava3 . core . sequence . compound . AminoAcidCompound > all = new org . biojava3 . alignment . SimpleProfilePair < org . biojava3 . core . sequence . ProteinSequence , org . biojava3 . core . sequence . compound . AminoAcidCompound > ( pair1 , pair2 , java . util . Arrays . asList ( new org . biojava3 . alignment . template . AlignedSequence . Step [ ] { org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . GAP , org . biojava3 . alignment . template . AlignedSequence . Step . GAP } ) , java . util . Arrays . asList ( new org . biojava3 . alignment . template . AlignedSequence . Step [ ] { org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . GAP , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND , org . biojava3 . alignment . template . AlignedSequence . Step . COMPOUND } ) ) ; "<AssertPlaceHolder>" ; } getQuery ( ) { return query ; }
org . junit . Assert . assertEquals ( all . getQuery ( ) , pair1 )
testBondAndTF ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( AND , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) , new org . openscience . cdk . isomorphism . matchers . Expr ( FALSE ) ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertFalse ( expr . matches ( bond ) )
testGenerateCandidatesNotIncludingIntervalExtremes ( ) { final com . cronutils . model . field . CronField cronField = new com . cronutils . model . field . CronField ( com . cronutils . model . field . CronFieldName . DAY_OF_WEEK , new com . cronutils . model . field . expression . Between ( new com . cronutils . model . field . value . IntegerFieldValue ( 1 ) , new com . cronutils . model . field . value . IntegerFieldValue ( 5 ) ) , com . cronutils . model . field . constraint . FieldConstraintsBuilder . instance ( ) . createConstraintsInstance ( ) ) ; final com . cronutils . model . time . generator . BetweenDayOfWeekValueGenerator generator = new com . cronutils . model . time . generator . BetweenDayOfWeekValueGenerator ( cronField , 2016 , 2 , new com . cronutils . mapper . WeekDay ( 1 , true ) ) ; final java . util . List < java . lang . Integer > values = generator . generateCandidates ( 1 , 29 ) ; validateInterval ( 1 , 5 , values ) ; validateInterval ( 8 , 12 , values ) ; validateInterval ( 15 , 19 , values ) ; validateInterval ( 22 , 26 , values ) ; "<AssertPlaceHolder>" ; } validateInterval ( int , int , java . util . List ) { for ( int j = start ; j < ( end + 1 ) ; j ++ ) { org . junit . Assert . assertTrue ( java . lang . String . format ( "%s<sp>not<sp>contained<sp>in<sp>values" , j ) , values . contains ( j ) ) ; } }
org . junit . Assert . assertTrue ( values . contains ( 29 ) )
get_distance_travelled_in_seconds_air ( ) { double val = com . levelup . java . exercises . beginner . SpeedOfSound . getDistanceTraveledInSeconds ( "air" , 1100 ) ; "<AssertPlaceHolder>" ; } getDistanceTraveledInSeconds ( java . lang . String , double ) { checkNotNull ( medium ) ; if ( medium . equalsIgnoreCase ( "air" ) ) { return distance / 1100.0 ; } else { if ( medium . equalsIgnoreCase ( "water" ) ) { return distance / 4900.0 ; } else { if ( medium . equalsIgnoreCase ( "steel" ) ) { return distance / 16400.0 ; } } } return 0.0 ; }
org . junit . Assert . assertEquals ( 1 , val , 0 )
testGetStereo ( ) { org . openscience . cdk . interfaces . IChemObject object = newChemObject ( ) ; org . openscience . cdk . interfaces . IAtom c = object . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; org . openscience . cdk . interfaces . IAtom o = object . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "O" ) ; org . openscience . cdk . interfaces . IBond b = object . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IBond . class , c , o , IBond . Order . DOUBLE , IBond . Stereo . UP ) ; "<AssertPlaceHolder>" ; } getStereo ( ) { return org . openscience . cdk . stereo . Conformation . toConformation ( getConfigOrder ( ) ) ; }
org . junit . Assert . assertEquals ( IBond . Stereo . UP , b . getStereo ( ) )
testRMClientGetConduit ( ) { org . apache . cxf . ws . rm . Proxy proxy = new org . apache . cxf . ws . rm . Proxy ( rme ) ; org . apache . cxf . Bus bus = control . createMock ( org . apache . cxf . Bus . class ) ; org . apache . cxf . endpoint . Endpoint endpoint = control . createMock ( org . apache . cxf . endpoint . Endpoint . class ) ; org . apache . cxf . transport . Conduit conduit = control . createMock ( org . apache . cxf . transport . Conduit . class ) ; org . apache . cxf . endpoint . ConduitSelector cs = control . createMock ( org . apache . cxf . endpoint . ConduitSelector . class ) ; org . easymock . EasyMock . expect ( cs . selectConduit ( org . easymock . EasyMock . isA ( org . apache . cxf . message . Message . class ) ) ) . andReturn ( conduit ) . anyTimes ( ) ; control . replay ( ) ; org . apache . cxf . ws . rm . Proxy . RMClient client = proxy . new org . apache . cxf . ws . rm . RMClient ( bus , endpoint , cs ) ; "<AssertPlaceHolder>" ; client . close ( ) ; } getConduit ( ) { org . apache . cxf . message . Message message = new org . apache . cxf . message . MessageImpl ( ) ; org . apache . cxf . message . Exchange exchange = new org . apache . cxf . message . ExchangeImpl ( ) ; message . setExchange ( exchange ) ; exchange . put ( org . apache . cxf . transport . MessageObserver . class , new org . apache . cxf . jaxrs . client . ClientMessageObserver ( this ) ) ; if ( ( conduitSelector ) != null ) { exchange . put ( org . apache . cxf . endpoint . Endpoint . class , conduitSelector . getEndpoint ( ) ) ; } exchange . put ( org . apache . cxf . Bus . class , bus ) ; prepareConduitSelector ( message ) ; return getConduitSelector ( ) . selectConduit ( message ) ; }
org . junit . Assert . assertSame ( conduit , client . getConduit ( ) )
NoNodeAvailableException_3_ ( ) { com . fujitsu . dc . common . es . impl . AbstractRetryableEsRequestTest . TestRequest requestMock = org . mockito . Mockito . spy ( new com . fujitsu . dc . common . es . impl . AbstractRetryableEsRequestTest . TestRequest ( ) ) ; org . elasticsearch . client . transport . NoNodeAvailableException toBeThrown = org . mockito . Mockito . mock ( org . elasticsearch . client . transport . NoNodeAvailableException . class ) ; org . mockito . Mockito . doThrow ( toBeThrown ) . doThrow ( toBeThrown ) . doThrow ( toBeThrown ) . doReturn ( com . fujitsu . dc . common . es . impl . AbstractRetryableEsRequestTest . SUCCESS_RESPONSE ) . when ( requestMock ) . doProcess ( ) ; java . lang . String result = requestMock . doRequest ( ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( requestMock , org . mockito . Mockito . times ( 4 ) ) . doProcess ( ) ; org . mockito . Mockito . verify ( requestMock , org . mockito . Mockito . times ( 0 ) ) . onParticularError ( org . mockito . Mockito . any ( org . elasticsearch . ElasticsearchException . class ) ) ; }
org . junit . Assert . assertEquals ( com . fujitsu . dc . common . es . impl . AbstractRetryableEsRequestTest . SUCCESS_RESPONSE , result )
isAuthenticationEnabledTrue ( ) { expect ( backend . nodeExists ( rootNode ) ) . andReturn ( true ) ; expect ( backend . getContent ( rootNode ) ) . andReturn ( getData ( org . talend . esb . servicelocator . client . internal . zk . RootNodeImplTest . V_5_2_0 , true ) ) ; replay ( backend ) ; "<AssertPlaceHolder>" ; verify ( backend ) ; } isAuthenticationEnabled ( ) { retrieveContent ( ) ; return authenticated ; }
org . junit . Assert . assertTrue ( rootNode . isAuthenticationEnabled ( ) )
layoutRPMBuildDownloadSourcesTest ( ) { org . eclipse . linuxtools . rpm . core . RPMProject rpmProject = importSrpm ( org . eclipse . linuxtools . rpm . core . tests . DownloadPrepareSourcesTest . testProject , RPMProjectLayout . RPMBUILD ) ; "<AssertPlaceHolder>" ; downloadFile ( rpmProject ) ; checkDownloadedFile ( rpmProject , RPMProjectLayout . RPMBUILD ) ; } importSrpm ( org . eclipse . core . resources . IProject , org . eclipse . linuxtools . rpm . core . RPMProjectLayout ) { org . eclipse . linuxtools . rpm . core . RPMProject rpmProject = new org . eclipse . linuxtools . rpm . core . RPMProject ( testProject , layout ) ; java . net . URL url = org . eclipse . core . runtime . FileLocator . find ( org . osgi . framework . FrameworkUtil . getBundle ( org . eclipse . linuxtools . rpm . core . tests . RPMProjectTest . class ) , new org . eclipse . core . runtime . Path ( ( ( ( ( "resources" + ( file_sep ) ) + "srpms" ) + ( file_sep ) ) + "hello-2.8-1.fc19.src.rpm" ) ) , null ) ; java . io . File foo = new java . io . File ( org . eclipse . core . runtime . FileLocator . toFileURL ( url ) . getPath ( ) ) ; rpmProject . importSourceRPM ( foo ) ; return rpmProject ; }
org . junit . Assert . assertNotNull ( rpmProject )
testSerialization ( ) { org . jfree . chart . plot . ValueMarker m1 = new org . jfree . chart . plot . ValueMarker ( 25.0 ) ; org . jfree . chart . plot . ValueMarker m2 = ( ( org . jfree . chart . plot . ValueMarker ) ( org . jfree . chart . TestUtils . serialised ( m1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( m1 , m2 )
valid_fail2 ( ) { java . lang . Object [ ] argument = new java . lang . Object [ 2 ] ; argument [ 0 ] = new java . lang . Object ( ) ; argument [ 1 ] = mock ( javax . servlet . ServletResponse . class ) ; "<AssertPlaceHolder>" ; } validate ( java . lang . String ) { if ( namespace == null ) { return false ; } return com . navercorp . pinpoint . common . hbase . namespace . HbaseNamespaceValidator . VALID_NAMESPACE . matcher ( namespace ) . matches ( ) ; }
org . junit . Assert . assertFalse ( validator . validate ( argument ) )
ttlPropagatesToPipeline ( ) { org . apache . shindig . gadgets . DefaultGadgetSpecFactoryTest . CapturingPipeline capturingPipeline = new org . apache . shindig . gadgets . DefaultGadgetSpecFactoryTest . CapturingPipeline ( ) ; org . apache . shindig . gadgets . GadgetSpecFactory forcedCacheFactory = new org . apache . shindig . gadgets . DefaultGadgetSpecFactory ( new org . apache . shindig . common . testing . ImmediateExecutorService ( ) , capturingPipeline , cacheProvider , 10000 ) ; forcedCacheFactory . getGadgetSpec ( org . apache . shindig . gadgets . DefaultGadgetSpecFactoryTest . createContext ( org . apache . shindig . gadgets . DefaultGadgetSpecFactoryTest . SPEC_URL , false ) ) ; "<AssertPlaceHolder>" ; } getCacheTtl ( ) { long expiration = getCacheExpiration ( ) ; if ( expiration != ( - 1 ) ) { return expiration - ( org . apache . shindig . gadgets . http . HttpResponse . getTimeSource ( ) . currentTimeMillis ( ) ) ; } return - 1 ; }
org . junit . Assert . assertEquals ( 10 , capturingPipeline . request . getCacheTtl ( ) )
testIsAllowedString_surrogatePairsAreNotAllowed ( ) { java . lang . String testStr = ( ( org . terasoluna . gfw . common . codepoints . CodePointsTest . SURROGATE_PAIR_CHAR_2000B ) + "" ) + ( org . terasoluna . gfw . common . codepoints . CodePointsTest . SURROGATE_PAIR_CHAR_2000B ) ; boolean result = new org . terasoluna . gfw . common . codepoints . CodePoints ( "" ) . containsAll ( testStr ) ; "<AssertPlaceHolder>" ; } containsAll ( java . lang . String ) { return ( this . firstExcludedCodePoint ( s ) ) == ( org . terasoluna . gfw . common . codepoints . CodePoints . NOT_FOUND ) ; }
org . junit . Assert . assertFalse ( result )
determineSchemaFindsLiterals ( ) { java . lang . String schema = TestAvroObjectInspectorGenerator . RECORD_SCHEMA ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; java . util . Properties props = new java . util . Properties ( ) ; props . put ( HaivvreoUtils . SCHEMA_LITERAL , schema ) ; org . apache . avro . Schema expected = org . apache . avro . Schema . parse ( schema ) ; "<AssertPlaceHolder>" ; } determineSchemaOrThrowException ( org . apache . hadoop . conf . Configuration , java . util . Properties ) { java . lang . String schemaString = properties . getProperty ( com . linkedin . haivvreo . HaivvreoUtils . SCHEMA_LITERAL ) ; if ( ( schemaString != null ) && ( ! ( schemaString . equals ( com . linkedin . haivvreo . HaivvreoUtils . SCHEMA_NONE ) ) ) ) return org . apache . avro . Schema . parse ( schemaString ) ; schemaString = properties . getProperty ( com . linkedin . haivvreo . HaivvreoUtils . SCHEMA_URL ) ; if ( ( schemaString == null ) || ( schemaString . equals ( com . linkedin . haivvreo . HaivvreoUtils . SCHEMA_NONE ) ) ) throw new com . linkedin . haivvreo . HaivvreoException ( com . linkedin . haivvreo . HaivvreoUtils . EXCEPTION_MESSAGE ) ; try { if ( schemaString . toLowerCase ( ) . startsWith ( "hdfs://" ) ) return com . linkedin . haivvreo . HaivvreoUtils . getSchemaFromHDFS ( schemaString , conf ) ; } catch ( java . io . IOException ioe ) { throw new com . linkedin . haivvreo . HaivvreoException ( ( "Unable<sp>to<sp>read<sp>schema<sp>from<sp>HDFS:<sp>" + schemaString ) , ioe ) ; } return org . apache . avro . Schema . parse ( new java . net . URL ( schemaString ) . openStream ( ) ) ; }
org . junit . Assert . assertEquals ( expected , com . linkedin . haivvreo . HaivvreoUtils . HaivvreoUtils . determineSchemaOrThrowException ( conf , props ) )
testReceiveRawBytes ( ) { transportHandler . setFetchableByte ( new byte [ ] { 1 , 2 , 3 } ) ; byte [ ] received = socket . receiveRawBytes ( ) ; "<AssertPlaceHolder>" ; } receiveRawBytes ( ) { return state . getTlsContext ( ) . getTransportHandler ( ) . fetchData ( ) ; }
org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 2 , 3 } , received )
testSet_IAtomContainer_IAtomContainer ( ) { org . openscience . cdk . interfaces . IAtom atomSource = new org . openscience . cdk . Atom ( "R" ) ; org . openscience . cdk . interfaces . IAtom atomTarget = new org . openscience . cdk . Atom ( "R" ) ; org . openscience . cdk . interfaces . IAtomContainer source = new org . openscience . cdk . AtomContainer ( ) ; source . addAtom ( atomSource ) ; org . openscience . cdk . interfaces . IAtomContainer target = new org . openscience . cdk . AtomContainer ( ) ; target . addAtom ( atomTarget ) ; boolean removeHydrogen = false ; org . openscience . cdk . smsd . algorithm . single . SingleMappingHandler instance = new org . openscience . cdk . smsd . algorithm . single . SingleMappingHandler ( removeHydrogen ) ; org . openscience . cdk . smsd . tools . MolHandler mol1 = new org . openscience . cdk . smsd . tools . MolHandler ( source , true , true ) ; org . openscience . cdk . smsd . tools . MolHandler mol2 = new org . openscience . cdk . smsd . tools . MolHandler ( target , true , true ) ; instance . set ( mol1 , mol2 ) ; "<AssertPlaceHolder>" ; } getFirstAtomMapping ( ) { return firstAtomMCS . isEmpty ( ) ? null : firstAtomMCS ; }
org . junit . Assert . assertNotNull ( instance . getFirstAtomMapping ( ) )
testGetItemPadding_onBottom ( ) { folder = new org . eclipse . swt . widgets . TabFolder ( shell , org . eclipse . swt . SWT . BOTTOM ) ; firstItem = new org . eclipse . swt . widgets . TabItem ( folder , org . eclipse . swt . SWT . NONE ) ; item = new org . eclipse . swt . widgets . TabItem ( folder , org . eclipse . swt . SWT . NONE ) ; org . eclipse . rap . rwt . theme . BoxDimensions actual = org . eclipse . rap . rwt . internal . theme . TabFolderThemeAdapter_Test . getThemeAdapter ( folder ) . getItemPadding ( item ) ; "<AssertPlaceHolder>" ; } getItemPadding ( boolean ) { org . eclipse . rap . rwt . internal . theme . SimpleSelector selector = ( selected ) ? org . eclipse . rap . rwt . internal . theme . SimpleSelector . SELECTED : org . eclipse . rap . rwt . internal . theme . SimpleSelector . DEFAULT ; org . eclipse . rap . rwt . internal . theme . CssValue cssValue = org . eclipse . rap . rwt . internal . theme . ThemeUtil . getCssValue ( "CTabItem" , "padding" , selector ) ; return ( ( org . eclipse . rap . rwt . internal . theme . CssBoxDimensions ) ( cssValue ) ) . dimensions ; }
org . junit . Assert . assertEquals ( new org . eclipse . rap . rwt . theme . BoxDimensions ( 4 , 4 , 4 , 4 ) , actual )
testBasicAutoDetect ( ) { setAuthType ( AuthType . AUTO_DETECT , true ) ; boolean result = checkExpected ( "Authentication_API_BasicDialog" , "Successfully<sp>logged<sp>in" ) ; "<AssertPlaceHolder>" ; } getExpectedErrorMsg ( ) { return expectedErrorMsg ; }
org . junit . Assert . assertTrue ( getExpectedErrorMsg ( ) , result )
testToString ( ) { java . lang . String value = com . spinn3r . artemis . util . misc . Throwables . toString ( new java . lang . NullPointerException ( "" ) ) ; "<AssertPlaceHolder>" ; } toString ( java . lang . Throwable ) { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream out = new java . io . PrintStream ( bos ) ; t . printStackTrace ( out ) ; return new java . lang . String ( bos . toByteArray ( ) , com . google . common . base . Charsets . UTF_8 ) ; }
org . junit . Assert . assertTrue ( ( value != null ) )
hasCurrentUserSubscriptions_SubscriptionManager_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "hasCurrentUserSubscriptions" ) ; boolean isSubscriptionManagerRoleAllowed = isRoleAllowed ( method , UserRoleType . SUBSCRIPTION_MANAGER ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . lang . reflect . Method , org . oscm . internal . types . enumtypes . UserRoleType ) { javax . annotation . security . RolesAllowed rolesAllowed = method . getAnnotation ( javax . annotation . security . RolesAllowed . class ) ; if ( rolesAllowed == null ) { return true ; } for ( java . lang . String role : rolesAllowed . value ( ) ) { if ( role . equals ( roleType . name ( ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( isSubscriptionManagerRoleAllowed )
test37 ( ) { java . lang . String code = "x<sp>=<sp>248<sp>\n" + ( ( ( ( "while<sp>x<sp>><sp>1:<sp>\n" + "<sp>if<sp>(x<sp>%<sp>2)<sp>==<sp>0:<sp>\n" ) + "<sp>x<sp>=<sp>x<sp>/<sp>2<sp>\n" ) + "<sp>else:<sp>\n<sp>" ) + "<sp>x<sp>=<sp>3<sp>*<sp>x<sp>+<sp>1<sp>\n" ) ; java . lang . String expected = "248<sp>0<sp>MSTORE<sp>LABEL_0<sp>1<sp>0<sp>MLOAD<sp>GT<sp>NOT<sp>REF_1<sp>JUMPI<sp>0<sp>2<sp>0<sp>MLOAD<sp>MOD<sp>EQ<sp>NOT<sp>REF_3<sp>JUMPI<sp>2<sp>0<sp>MLOAD<sp>DIV<sp>0<sp>MSTORE<sp>REF_2<sp>JUMP<sp>LABEL_3<sp>1<sp>0<sp>MLOAD<sp>3<sp>MUL<sp>ADD<sp>0<sp>MSTORE<sp>LABEL_2<sp>REF_0<sp>JUMP<sp>LABEL_1" ; org . ethereum . serpent . SerpentParser parser = org . ethereum . serpent . ParserUtils . getParser ( org . ethereum . serpent . SerpentLexer . class , org . ethereum . serpent . SerpentParser . class , code ) ; org . antlr . v4 . runtime . tree . ParseTree tree = parser . parse ( ) ; java . lang . String result = new org . ethereum . serpent . SerpentToAssemblyCompiler ( ) . visit ( tree ) ; result = result . replaceAll ( "\\s+" , "<sp>" ) ; result = result . trim ( ) ; "<AssertPlaceHolder>" ; } parse ( ) { org . ethereum . util . RLPList paramsList = ( ( org . ethereum . util . RLPList ) ( org . ethereum . util . RLP . decode2 ( encoded ) . get ( 0 ) ) ) ; blockHashes = new java . util . ArrayList ( ) ; for ( int i = 1 ; i < ( paramsList . size ( ) ) ; ++ i ) { org . ethereum . util . RLPItem rlpData = ( ( org . ethereum . util . RLPItem ) ( paramsList . get ( i ) ) ) ; blockHashes . add ( rlpData . getRLPData ( ) ) ; } parsed = true ; }
org . junit . Assert . assertEquals ( expected , result )
getOperationId ( ) { java . lang . String id = row . getOperationId ( ) ; "<AssertPlaceHolder>" ; } getOperationId ( ) { return operationId ; }
org . junit . Assert . assertNull ( id )
parseWithinFilter ( ) { org . deegree . filter . Filter filter = parse ( "testfilter24.xml" ) ; "<AssertPlaceHolder>" ; } parse ( java . util . Map ) { java . lang . String procedure = getRequired ( prams , "PROCEDURE" ) ; java . lang . String format = prams . get ( "OUTPUTFORMAT" ) ; if ( format == null ) { format = org . deegree . protocol . sos . describesensor . DescribeSensor100KVPAdapter . DEFAULT_FORMAT ; } return new org . deegree . protocol . sos . describesensor . DescribeSensor ( procedure , format ) ; }
org . junit . Assert . assertNotNull ( filter )
testRemoveContentOverrideWithPresentContentOverride ( ) { org . candlepin . dto . api . v1 . ActivationKeyDTO dto = new org . candlepin . dto . api . v1 . ActivationKeyDTO ( ) ; java . util . Set < org . candlepin . dto . api . v1 . ContentOverrideDTO > overrides = new java . util . HashSet ( ) ; overrides . add ( new org . candlepin . dto . api . v1 . ContentOverrideDTO ( ) . setContentLabel ( "test-contentLabel-override-4" ) . setName ( "test-name-override-4" ) . setValue ( "test-value-override-4" ) ) ; dto . setContentOverrides ( overrides ) ; org . candlepin . dto . api . v1 . ContentOverrideDTO override = new org . candlepin . dto . api . v1 . ContentOverrideDTO ( ) . setContentLabel ( "test-contentLabel-override-4" ) . setName ( "test-name-override-4" ) . setValue ( "test-value-override-4" ) ; "<AssertPlaceHolder>" ; } removeContentOverride ( org . candlepin . dto . api . v1 . ContentOverrideDTO ) { if ( contentOverrideDto == null ) { throw new java . lang . IllegalArgumentException ( "contentOverrideDto<sp>is<sp>null" ) ; } if ( ( this . contentOverrides ) == null ) { return false ; } java . util . List < org . candlepin . dto . api . v1 . ContentOverrideDTO > remove = new java . util . LinkedList ( ) ; for ( org . candlepin . dto . api . v1 . ContentOverrideDTO candidate : this . getContentOverrides ( ) ) { if ( ( candidate . getContentLabel ( ) . equals ( contentOverrideDto . getContentLabel ( ) ) ) && ( candidate . getName ( ) . equals ( contentOverrideDto . getName ( ) ) ) ) { remove . add ( candidate ) ; } } return this . contentOverrides . removeAll ( remove ) ; }
org . junit . Assert . assertTrue ( dto . removeContentOverride ( override ) )
testForwardDeletionNormalization ( ) { de . charite . compbio . jannovar . reference . TranscriptPosition txPos = new de . charite . compbio . jannovar . reference . TranscriptPosition ( infoForward , 1 , PositionType . ZERO_BASED ) ; de . charite . compbio . jannovar . reference . GenomePosition gPos = projectorForward . transcriptToGenomePos ( txPos ) . withStrand ( Strand . FWD ) ; de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( gPos , "GTCACGTCCGGCGCG" , "" , Strand . FWD ) ; de . charite . compbio . jannovar . reference . GenomeVariant updatedChange = de . charite . compbio . jannovar . reference . GenomeVariantNormalizer . normalizeDeletion ( this . infoForward , change , txPos ) ; de . charite . compbio . jannovar . reference . GenomeVariant expectedChange = new de . charite . compbio . jannovar . reference . GenomeVariant ( gPos . shifted ( 1 ) , "TCACGTCCGGCGCGG" , "" , Strand . FWD ) ; "<AssertPlaceHolder>" ; } shifted ( int ) { return new de . charite . compbio . jannovar . reference . CDSPosition ( transcript , ( ( pos ) + delta ) , PositionType . ZERO_BASED ) ; }
org . junit . Assert . assertEquals ( expectedChange , updatedChange )
testBatchUpdate ( ) { java . util . List < com . vip . saturn . job . console . mybatis . entity . DashboardHistory > dashboardHistories = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 2 ; i ++ ) { com . vip . saturn . job . console . mybatis . entity . DashboardHistory dashboardHistory = new com . vip . saturn . job . console . mybatis . entity . DashboardHistory ( "zk" , ( "type" + ( java . lang . String . valueOf ( i ) ) ) , "topic" , "hello" , new java . util . Date ( ) ) ; dashboardHistories . add ( dashboardHistory ) ; } dashboardHistoryRepository . batchCreateOrUpdateHistory ( dashboardHistories ) ; for ( int i = 0 ; i < 2 ; i ++ ) { com . vip . saturn . job . console . mybatis . entity . DashboardHistory dashboardHistory = new com . vip . saturn . job . console . mybatis . entity . DashboardHistory ( "zk" , ( "type" + ( java . lang . String . valueOf ( i ) ) ) , "topic" , "hello<sp>world" , new java . util . Date ( ) ) ; dashboardHistories . add ( dashboardHistory ) ; } dashboardHistoryRepository . batchCreateOrUpdateHistory ( dashboardHistories ) ; java . util . List < java . lang . String > zkClusters = new java . util . ArrayList ( ) ; zkClusters . add ( "zk" ) ; java . util . List < com . vip . saturn . job . console . mybatis . entity . DashboardHistory > result = dashboardHistoryRepository . selectByZkClustersAndTypeAndTopicAndFromStartDateToEndDate ( zkClusters , null , null , null , null ) ; for ( com . vip . saturn . job . console . mybatis . entity . DashboardHistory history : result ) { "<AssertPlaceHolder>" ; } } getContent ( ) { return content ; }
org . junit . Assert . assertEquals ( "hello<sp>world" , history . getContent ( ) )
testForumSerialization ( ) { com . ibm . sbt . services . client . connections . forums . Forum forumGot = forumService . getForum ( createForum ( ) . getForumUuid ( ) ) ; final java . lang . String forumUuid = forumGot . getForumUuid ( ) ; new com . ibm . sbt . services . client . SerializationUtil ( ) { @ com . ibm . sbt . services . client . connections . forums . Override public void validateSerializable ( ) { com . ibm . sbt . services . client . connections . forums . Forum forumObject = null ; try { java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( new java . io . FileInputStream ( serFile ) ) ; forumObject = ( ( com . ibm . sbt . services . client . connections . forums . Forum ) ( ois . readObject ( ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { } } } . isSerializable ( forumGot ) ; } getForumUuid ( ) { return super . getUid ( ) ; }
org . junit . Assert . assertEquals ( forumObject . getForumUuid ( ) , forumUuid )
testGetWithReadOnly ( ) { org . apache . hadoop . hbase . thrift2 . ThriftHBaseServiceHandler handler = createHandler ( ) ; byte [ ] rowName = org . apache . hadoop . hbase . util . Bytes . toBytes ( "testGet" ) ; java . nio . ByteBuffer table = wrap ( org . apache . hadoop . hbase . thrift2 . TestThriftHBaseServiceHandlerWithReadOnly . tableAname ) ; org . apache . hadoop . hbase . thrift2 . generated . TGet get = new org . apache . hadoop . hbase . thrift2 . generated . TGet ( wrap ( rowName ) ) ; boolean exceptionCaught = false ; try { handler . get ( table , get ) ; } catch ( org . apache . hadoop . hbase . thrift2 . generated . TIOError e ) { exceptionCaught = true ; } finally { "<AssertPlaceHolder>" ; } } get ( java . lang . String , java . lang . String ) { org . apache . hadoop . hbase . http . resource . JerseyResource . LOG . info ( ( ( ( ( ( ( ( "get:<sp>" + ( org . apache . hadoop . hbase . http . resource . JerseyResource . PATH ) ) + "=" ) + path ) + ",<sp>" ) + ( org . apache . hadoop . hbase . http . resource . JerseyResource . OP ) ) + "=" ) + op ) ) ; final java . util . Map < java . lang . String , java . lang . Object > m = new java . util . TreeMap ( ) ; m . put ( org . apache . hadoop . hbase . http . resource . JerseyResource . PATH , path ) ; m . put ( org . apache . hadoop . hbase . http . resource . JerseyResource . OP , op ) ; final java . lang . String js = org . eclipse . jetty . util . ajax . JSON . toString ( m ) ; return javax . ws . rs . core . Response . ok ( js ) . type ( MediaType . APPLICATION_JSON ) . build ( ) ; }
org . junit . Assert . assertFalse ( exceptionCaught )
testGetTemplates ( ) { addFormTemplate ( 0 , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , WorkflowConstants . STATUS_ANY ) ; addFormTemplate ( 0 , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , WorkflowConstants . STATUS_ANY ) ; addFormTemplate ( 0 , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , WorkflowConstants . STATUS_ANY ) ; java . util . List < com . liferay . dynamic . data . mapping . model . DDMTemplate > templates = com . liferay . dynamic . data . mapping . service . DDMTemplateServiceUtil . getTemplates ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) , group . getGroupId ( ) , com . liferay . dynamic . data . mapping . service . test . DDMTemplateServiceTest . _structureClassNameId , com . liferay . dynamic . data . mapping . service . test . DDMTemplateServiceTest . _recordSetClassNameId , WorkflowConstants . STATUS_ANY ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( templates . toString ( ) , 3 , templates . size ( ) )
getArgumentsAsStringShouldIncludeDetailsFromAllValidArguments ( ) { final java . lang . String argumentsAsString = net . usikkert . kouchat . argument . Argument . getArgumentsAsString ( ) ; final java . lang . String expected = "<sp>--console<sp>(-c)<sp>Starts<sp>KouChat<sp>in<sp>console<sp>mode.\n" + ( ( ( ( ( ( "<sp>--minimized<sp>Starts<sp>KouChat<sp>minimized.\n" + "<sp>--debug<sp>(-d)<sp>Starts<sp>KouChat<sp>with<sp>verbose<sp>debug<sp>output<sp>enabled.\n" ) + "<sp>--help<sp>(-h)<sp>Shows<sp>this<sp>help<sp>message.\n" ) + "<sp>--version<sp>(-v)<sp>Shows<sp>version<sp>information.\n" ) + "<sp>--no-private-chat<sp>Disables<sp>private<sp>chat.\n" ) + "<sp>--always-log<sp>Enables<sp>logging,<sp>without<sp>option<sp>to<sp>disable.\n" ) + "<sp>--log-location=<value><sp>Location<sp>to<sp>store<sp>log<sp>files." ) ; "<AssertPlaceHolder>" ; } getArgumentsAsString ( ) { final net . usikkert . kouchat . argument . Argument [ ] arguments = net . usikkert . kouchat . argument . Argument . getValidArguments ( ) ; final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; for ( final net . usikkert . kouchat . argument . Argument argument : arguments ) { builder . append ( "\n<sp>" ) ; builder . append ( net . usikkert . kouchat . util . Tools . postPadString ( argument . getArgument ( ) , 24 ) ) ; builder . append ( argument . description ) ; } return builder . toString ( ) . replaceFirst ( "\n" , "" ) ; }
org . junit . Assert . assertEquals ( expected , argumentsAsString )
testLinkToMethodHoverUnQualifiedOnType ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "package<sp>testpackage" ) ; _builder . newLine ( ) ; _builder . append ( "/**" ) ; _builder . newLine ( ) ; _builder . append ( "<sp>" ) ; _builder . append ( "*<sp>see<sp>{@link<sp>#bar(int)}" ) ; _builder . newLine ( ) ; _builder . append ( "<sp>" ) ; _builder . append ( "*/" ) ; _builder . newLine ( ) ; _builder . append ( "*<sp>see<sp>{@link<sp>#bar(int)}" 0 ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "def<sp>bar(int<sp>n){}" ) ; _builder . newLine ( ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; final org . eclipse . xtend . core . xtend . XtendFile xtendFile = this . parseHelper . parse ( _builder , this . getResourceSet ( ) ) ; final org . eclipse . xtend . core . xtend . XtendClass clazz = org . eclipse . xtext . xbase . lib . IterableExtensions . < org . eclipse . xtend . core . xtend . XtendClass > head ( com . google . common . collect . Iterables . < org . eclipse . xtend . core . xtend . XtendClass > filter ( xtendFile . getXtendTypes ( ) , org . eclipse . xtend . core . xtend . XtendClass . class ) ) ; final java . lang . String docu = this . documentationProvider . getDocumentation ( clazz ) ; org . eclipse . xtend2 . lib . StringConcatenation _builder_1 = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder_1 . append ( "see<sp><code><a<sp>href=\"eclipse-xtext-doc:__synthetic0.xtend%23/1/@members.1\">#bar(int)</a></code>" ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( _e ) ; } } toString ( ) { org . eclipse . xtext . xbase . lib . util . ToStringBuilder b = new org . eclipse . xtext . xbase . lib . util . ToStringBuilder ( this ) ; b . add ( "title" , this . title ) ; b . add ( "year" , this . year ) ; b . add ( "rating" , this . rating ) ; b . add ( "numberOfVotes" , this . numberOfVotes ) ; b . add ( "categories" , this . categories ) ; return b . toString ( ) ; }
org . junit . Assert . assertEquals ( _builder_1 . toString ( ) , docu )
evaluationIsLazyByDefault ( ) { java . lang . String [ ] arguments = new java . lang . String [ ] { "-applicationContext" , "classpath:com/ontology2/centipede/shell/objectCountingContext.xml" , "run" , "shellTest" } ; com . ontology2 . centipede . shell . InfovoreShell . main ( arguments ) ; "<AssertPlaceHolder>" ; } getCreated ( ) { return com . ontology2 . centipede . shell . ObjectThatCountsClassInstances . totalCreated . get ( ) ; }
org . junit . Assert . assertEquals ( 0 , com . ontology2 . centipede . shell . ObjectThatCountsClassInstances . getCreated ( ) )
testCreateSurveillanceServiceTableUsingViewName ( ) { java . lang . String viewName = "default" ; org . opennms . web . svclayer . model . SimpleWebTable table = m_surveillanceService . createSurveillanceTable ( viewName , new org . opennms . web . svclayer . model . ProgressMonitor ( ) { @ org . opennms . web . svclayer . support . Override public void beginNextPhase ( java . lang . String string ) { System . err . println ( ( "PHASE:<sp>" + string ) ) ; } @ org . opennms . web . svclayer . support . Override public void setPhaseCount ( int i ) { } } ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return m_title ; }
org . junit . Assert . assertEquals ( "default" , table . getTitle ( ) )
remove_should_not_add_removed_descendants ( ) { java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > ( ) ; input . add ( KPN ( 4 , "AAAA" , 1 , 1 , false ) ) ; input . add ( KPN ( 4 , "AAAA" , 2 , 2 , false ) ) ; input . add ( KPN ( 4 , "AAAA" , 3 , 3 , false ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 0 ) , input . get ( 1 ) ) ; au . edu . wehi . idsv . debruijn . positional . KmerPathNode . addEdge ( input . get ( 1 ) , input . get ( 2 ) ) ; au . edu . wehi . idsv . debruijn . positional . MemoizedContigCaller caller = ( ( au . edu . wehi . idsv . debruijn . positional . MemoizedContigCaller ) ( getCaller ( input , 10 ) ) ) ; caller . bestContig ( Integer . MAX_VALUE ) ; caller . remove ( input . get ( 1 ) ) ; caller . remove ( input . get ( 0 ) ) ; caller . remove ( input . get ( 2 ) ) ; caller . sanityCheck ( ) ; "<AssertPlaceHolder>" ; } bestContig ( int ) { au . edu . wehi . idsv . debruijn . positional . TraversalNode tn = bestTraversal ( unprocessedPosition ) ; if ( tn == null ) return null ; return asUnanchoredPath ( tn ) ; }
org . junit . Assert . assertNull ( caller . bestContig ( Integer . MAX_VALUE ) )
not_related_when_isKeysOnly ( ) { net . ripe . db . whois . query . query . Query query = net . ripe . db . whois . query . query . Query . parse ( "-K<sp>10.0.0.0" ) ; "<AssertPlaceHolder>" ; } isReturningReferencedObjects ( ) { return ! ( ( ( ( ( queryParser . hasOption ( QueryFlag . NO_REFERENCED ) ) || ( isShortHand ( ) ) ) || ( isKeysOnly ( ) ) ) || ( isResource ( ) ) ) || ( isBriefAbuseContact ( ) ) ) ; }
org . junit . Assert . assertThat ( query . isReturningReferencedObjects ( ) , org . hamcrest . Matchers . is ( false ) )
testInstanceBadMaxErrors ( ) { org . irods . jargon . core . transfer . TransferControlBlock testControlBlock = org . irods . jargon . core . transfer . DefaultTransferControlBlock . instance ( null , ( - 3 ) ) ; "<AssertPlaceHolder>" ; } instance ( java . lang . String , int ) { return new org . irods . jargon . core . transfer . DefaultTransferControlBlock ( restartAbsolutePath , maxErrorsBeforeCancelling ) ; }
org . junit . Assert . assertNotNull ( testControlBlock )
testSerializeEmpty ( ) { final org . jboss . errai . forge . config . SerializableSet set = new org . jboss . errai . forge . config . SerializableSet ( ) ; "<AssertPlaceHolder>" ; } serialize ( ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; final java . util . Iterator < java . lang . String > iterator = iterator ( ) ; if ( iterator . hasNext ( ) ) builder . append ( iterator . next ( ) ) ; while ( iterator . hasNext ( ) ) { builder . append ( org . jboss . errai . forge . config . SerializableSet . delimeter ) . append ( iterator . next ( ) ) ; } return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( "" , set . serialize ( ) )
union ( ) { com . querydsl . core . types . SubQueryExpression < java . lang . Integer > sq1 = select ( com . querydsl . jpa . AbstractSQLTest . cat . id . max ( ) ) . from ( com . querydsl . jpa . AbstractSQLTest . cat ) ; com . querydsl . core . types . SubQueryExpression < java . lang . Integer > sq2 = select ( com . querydsl . jpa . AbstractSQLTest . cat . id . min ( ) ) . from ( com . querydsl . jpa . AbstractSQLTest . cat ) ; java . util . List < java . lang . Integer > list = query ( ) . union ( sq1 , sq2 ) . list ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( values . isEmpty ( ) ) && ( batches . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( list . isEmpty ( ) )
testSendMailFail ( ) { com . liferay . portal . kernel . test . util . PropsTestUtil . setProps ( java . util . Collections . emptyMap ( ) ) ; com . liferay . portal . kernel . nio . intraband . test . MockIntraband mockIntraband = new com . liferay . portal . kernel . nio . intraband . test . MockIntraband ( ) ; java . io . IOException iOException = new java . io . IOException ( ) ; mockIntraband . setIOException ( iOException ) ; try { com . liferay . portal . kernel . nio . intraband . mailbox . MailboxUtil . sendMail ( new com . liferay . portal . kernel . nio . intraband . test . MockRegistrationReference ( mockIntraband ) , java . nio . ByteBuffer . allocate ( 0 ) ) ; org . junit . Assert . fail ( ) ; } catch ( com . liferay . portal . kernel . nio . intraband . mailbox . MailboxException me ) { "<AssertPlaceHolder>" ; } } getCause ( ) { return _cause ; }
org . junit . Assert . assertSame ( iOException , me . getCause ( ) )
testMatchesWithNonMatchingHttpServiceFilter ( ) { createHttpServiceFilter ( ) ; boolean matches = matcher . matches ( ) ; "<AssertPlaceHolder>" ; } matches ( ) { return ( matchesHttpService ( ) ) && ( matchesConfigurator ( ) ) ; }
org . junit . Assert . assertFalse ( matches )
shouldApplyNodeCommandToTheStoreAndInvalidateTheCache ( ) { final org . neo4j . kernel . impl . api . BatchTransactionApplier applier = newApplier ( false ) ; final org . neo4j . kernel . impl . store . record . NodeRecord before = new org . neo4j . kernel . impl . store . record . NodeRecord ( 11 ) ; before . setLabelField ( 42 , asList ( one , two ) ) ; final org . neo4j . kernel . impl . store . record . NodeRecord after = new org . neo4j . kernel . impl . store . record . NodeRecord ( 12 ) ; after . setInUse ( false ) ; after . setLabelField ( 42 , asList ( one , two , three ) ) ; final org . neo4j . kernel . impl . transaction . command . Command . NodeCommand command = new org . neo4j . kernel . impl . transaction . command . Command . NodeCommand ( before , after ) ; boolean result = apply ( applier , command :: handle , transactionToApply ) ; "<AssertPlaceHolder>" ; verify ( lockService , times ( 1 ) ) . acquireNodeLock ( command . getKey ( ) , LockService . LockType . WRITE_LOCK ) ; verify ( nodeStore , times ( 1 ) ) . updateRecord ( after ) ; } apply ( org . neo4j . kernel . api . proc . Context , java . lang . Object [ ] , org . neo4j . kernel . api . ResourceTracker ) { try { java . lang . Thread . sleep ( 50 ) ; } catch ( java . lang . InterruptedException e ) { throw new org . neo4j . internal . kernel . api . exceptions . ProcedureException ( Status . General . UnknownError , e , "Interrupted" ) ; } return org . neo4j . collection . RawIterator . empty ( ) ; }
org . junit . Assert . assertFalse ( result )
testUpdateSearchIndexStatus ( ) { org . finra . herd . model . jpa . SearchIndexEntity searchIndexEntity = searchIndexDaoTestHelper . createSearchIndexEntity ( org . finra . herd . service . helper . SEARCH_INDEX_NAME , org . finra . herd . service . helper . SEARCH_INDEX_TYPE , org . finra . herd . service . helper . SEARCH_INDEX_STATUS ) ; searchIndexStatusDaoTestHelper . createSearchIndexStatusEntity ( org . finra . herd . service . helper . SEARCH_INDEX_STATUS_2 ) ; searchIndexDaoHelper . updateSearchIndexStatus ( new org . finra . herd . model . api . xml . SearchIndexKey ( SEARCH_INDEX_NAME ) , org . finra . herd . service . helper . SEARCH_INDEX_STATUS_2 ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( org . finra . herd . service . helper . SEARCH_INDEX_STATUS_2 , searchIndexEntity . getStatus ( ) . getCode ( ) )
testGetOsDistroVersion ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "DevOsDitributionVersion" , "N/A" } ; try { boolean foundMatch = false ; for ( java . lang . String possibility : expected ) { if ( org . eclipse . kura . core . system . test . SystemServiceTest . systemService . getOsDistroVersion ( ) . equals ( possibility ) ) { foundMatch = true ; break ; } } "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "getOsDistroVersion()<sp>failed:<sp>" + ( e . getMessage ( ) ) ) ) ; } } equals ( java . lang . Object ) { if ( ! ( obj instanceof com . codeminders . hidapi . HIDDevice ) ) return false ; return ( ( ( com . codeminders . hidapi . HIDDevice ) ( obj ) ) . peer ) == ( peer ) ; }
org . junit . Assert . assertTrue ( foundMatch )
when_defaults_then_stationaryFilterActive ( ) { org . n52 . io . request . FilterResolver resolver = createResolver ( org . n52 . io . request . IoParameters . createDefaults ( ) ) ; "<AssertPlaceHolder>" ; } hasMobileFilter ( ) { return ( parameters . getMobile ( ) ) != null ; }
org . junit . Assert . assertFalse ( resolver . hasMobileFilter ( ) )
deveObterIcmsSTComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMSST icmsSetado = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMSST ( ) ; icms . setIcmsst ( icmsSetado ) ; "<AssertPlaceHolder>" ; } getIcmsst ( ) { return this . icmsst ; }
org . junit . Assert . assertEquals ( icmsSetado , icms . getIcmsst ( ) )
g_V_hasLabelXsoftwareX_name_fold_orderXlocalX_index_unfold_order_byXtailXlocal_1XX ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , java . util . List < java . lang . Object > > traversal = get_g_V_hasLabelXsoftwareX_name_fold_orderXlocalX_index_unfold_order_byXtailXlocal_1XX ( ) ; printTraversalForm ( traversal ) ; checkOrderedResults ( java . util . Arrays . asList ( java . util . Arrays . asList ( "lop" , 0 ) , java . util . Arrays . asList ( "ripple" , 1 ) ) , traversal ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ! ( this . locked ) ) this . applyStrategies ( ) ; return ( ( this . lastTraverser . bulk ( ) ) > 0L ) || ( this . finalEndStep . hasNext ( ) ) ; }
org . junit . Assert . assertFalse ( traversal . hasNext ( ) )
testGetParametersWithDefaultEntityAndDisabledDEfaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . Enrolment entity = new org . lnu . is . domain . enrolment . Enrolment ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
manageModificationVDiskDeletion_VSERVER_STARTED_Running_MailForCompletion ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; org . oscm . app . iaas . data . FlowState newState = null ; parameters . put ( PropertyHandler . MAIL_FOR_COMPLETION , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . MAIL_FOR_COMPLETION , "test@email.com" ) ) ; doReturn ( VServerStatus . RUNNING ) . when ( vServerProcessor . vserverComm ) . getVServerStatus ( paramHandler ) ; newState = vServerProcessor . manageModificationVDiskDeletion ( "controllerId" , "instanceId" , paramHandler , flowState , newState ) ; "<AssertPlaceHolder>" ; } manageModificationVDiskDeletion ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { org . oscm . app . iaas . data . FlowState newState = newStateParam ; boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; switch ( flowState ) { case VSERVER_MODIFICATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOPPED_FOR_MODIFICATION , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . RUNNING . equals ( status ) ) { vserverComm . stopVServer ( paramHandler ) ; } else if ( VServerStatus . STOPPED . equals ( status ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED_FOR_MODIFICATION ; } } break ; case VSERVER_STOPPED_FOR_MODIFICATION : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATING , paramHandler ) ) ) { vserverComm . modifyVServerAttributes ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; if ( vdiskInfo . isAttachedVDisksFound ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETION_REQUESTED ; } } break ; case VSDISK_DELETION_REQUESTED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHING , paramHandler ) ) ) { vdiskInfo . detachVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHING ; } break ; case VSDISK_DETACHING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHED , paramHandler ) ) { if ( vdiskInfo . areVDisksDetached ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHED ; } } break ; case VSDISK_DETACHED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DELETING , paramHandler ) ) ) { vdiskInfo . destroyVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETING ; } break ; case VSDISK_DELETING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DESTROYED , paramHandler ) ) { if ( vdiskInfo . areVDisksDestroyed ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; } } break ; case VSERVER_UPDATING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATED , paramHandler ) ) { if ( VServerStatus . STOPPED . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATED ; } } break ; case VSERVER_UPDATED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTING , paramHandler ) ) { if ( vserverComm . startVServer ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; } } break ; case VSERVER_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; } } break ; case VSERVER_STARTED : if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { if ( ( paramHandler . getMailForCompletion ( ) ) != null ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_RETRIEVEGUEST , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_RETRIEVEGUEST ; } } else { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; case VSERVER_RETRIEVEGUEST : java . lang . String mail = paramHandler . getMailForCompletion ( ) ; if ( mail != null ) { newState = dispatchVServerManualOperation ( controllerId , instanceId , paramHandler , mail ) ; } else { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; default : } return newState ; }
org . junit . Assert . assertEquals ( FlowState . VSERVER_RETRIEVEGUEST , newState )
givenAPropertyAttribute_whenResolve_thenAResolvedPropertyViewAttributeShouldBeReturned ( ) { org . robobinding . viewattribute . property . PropertyViewAttributeBinder viewAttributeBinder = org . mockito . Mockito . mock ( org . robobinding . viewattribute . property . PropertyViewAttributeBinder . class ) ; org . robobinding . binder . ByBindingAttributeMappingsResolver byBindingAttributeMappingsResolver = newByBindingAttributeMappingsResolver ( org . robobinding . binder . MockInitializedBindingAttributeMappingsBuilder . aBindingAttributeMappings ( ) . withPropertyAttribute ( "propertyAttribute" , viewAttributeBinder ) . build ( ) ) ; java . util . Collection < org . robobinding . viewattribute . ViewAttributeBinder > viewAttributes = byBindingAttributeMappingsResolver . resolve ( pendingAttributesForView ) ; "<AssertPlaceHolder>" ; } newHashSet ( java . util . Iterator ) { java . util . HashSet < E > set = org . robobinding . util . Sets . newHashSet ( ) ; org . robobinding . util . Iterators . addAll ( set , elements ) ; return set ; }
org . junit . Assert . assertThat ( com . google . common . collect . Sets . newHashSet ( viewAttributes ) , org . hamcrest . CoreMatchers . equalTo ( com . google . common . collect . Sets . < org . robobinding . viewattribute . ViewAttributeBinder > newHashSet ( viewAttributeBinder ) ) )
testGetCallableTarget ( ) { System . out . println ( "getCallableTarget" ) ; gov . hhs . fha . nhinc . gateway . executorservice . ResponseWrapper instance = new gov . hhs . fha . nhinc . gateway . executorservice . ResponseWrapper ( ) ; java . lang . Object expResult = null ; java . lang . Object result = instance . getCallableTarget ( ) ; "<AssertPlaceHolder>" ; } getCallableTarget ( ) { return target ; }
org . junit . Assert . assertEquals ( expResult , result )
testSerialization_OnlyTable ( ) { byte [ ] serialized = serialize ( tableQueryConfig ) ; org . apache . accumulo . core . client . mapreduce . InputTableConfig actualConfig = deserialize ( serialized ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] ) { java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( bytes ) ; org . apache . accumulo . core . client . mapreduce . InputTableConfig actualConfig = new org . apache . accumulo . core . client . mapreduce . InputTableConfig ( new java . io . DataInputStream ( bais ) ) ; bais . close ( ) ; return actualConfig ; }
org . junit . Assert . assertEquals ( tableQueryConfig , actualConfig )
test_x_$_fullctx ( ) { org . antlr . v4 . runtime . atn . PredictionContext r = contextCache . join ( x ( true ) , PredictionContext . EMPTY_FULL ) ; System . out . println ( org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) ; java . lang . String expecting = "digraph<sp>G<sp>{\n" + ( ( ( ( "rankdir=LR;\n" + "<sp>s0[shape=record,<sp>label=\"<p0>|<p1>$\"];\n" ) + "<sp>s1[label=\"$\"];\n" ) + "<sp>s0:p0->s1[label=\"9\"];\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) )
cache_loop3 ( ) { ws . prova . kernel2 . ProvaKnowledgeBase kb = new ws . prova . reference2 . ProvaKnowledgeBaseImpl ( ) ; ws . prova . kernel2 . ProvaResultSet resultSet = new ws . prova . reference2 . ProvaResultSetImpl ( ) ; ws . prova . parser2 . ProvaParserImpl parser = new ws . prova . parser2 . ProvaParserImpl ( "rules/reloaded/loop3.prova" , new java . lang . Object [ ] { } ) ; try { java . util . List < ws . prova . kernel2 . ProvaRule > rules = parser . parse ( kb , resultSet , "rules/reloaded/loop3.prova" ) ; int [ ] numSolutions = new int [ ] { 4 } ; int i = 0 ; for ( ws . prova . kernel2 . ProvaRule rule : rules ) { if ( ( rule . getHead ( ) ) == null ) { ws . prova . kernel2 . ProvaResolutionInferenceEngine engine = new ws . prova . reference2 . ProvaResolutionInferenceEngineImpl ( kb , rule ) ; engine . run ( ) ; "<AssertPlaceHolder>" ; resultSet . getSolutions ( ) . clear ( ) ; } } } catch ( ws . prova . parser2 . ProvaParsingException e ) { e . printStackTrace ( ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } getSolutions ( ) { return solutions ; }
org . junit . Assert . assertEquals ( resultSet . getSolutions ( ) . size ( ) , numSolutions [ ( i ++ ) ] )
test_invalid_port43_exceed_maxlength ( ) { org . restfulwhois . rdap . common . dto . DomainDto domain = generateDomainDto ( ) ; java . lang . String stringExceedOneMoreChar = createStringWithLength ( ( ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_PORT43 ) + 1 ) ) ; domain . setPort43 ( stringExceedOneMoreChar ) ; "<AssertPlaceHolder>" ; java . lang . String content = org . restfulwhois . rdap . JsonHelper . serialize ( domain ) ; mockMvc . perform ( post ( org . restfulwhois . rdap . controller . DomainCreateControllerTest . URI_DOMAIN_U ) . contentType ( org . springframework . http . MediaType . parseMediaType ( rdapJson ) ) . content ( content ) ) . andExpect ( status ( ) . isBadRequest ( ) ) . andExpect ( content ( ) . contentType ( rdapJson ) ) . andExpect ( jsonPath ( "$.errorCode" ) . value ( 400 ) ) . andExpect ( jsonPath ( "$.subErrorCode" ) . value ( 4003 ) ) . andExpect ( jsonPath ( "$.description" ) . value ( org . hamcrest . CoreMatchers . hasItems ( java . lang . String . format ( ServiceErrorCode . ERROR_4003 . getMessage ( ) , "port43" , ( ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_PORT43 ) + "" ) ) ) ) ) ; } getPort43 ( ) { return port43 ; }
org . junit . Assert . assertTrue ( ( ( domain . getPort43 ( ) . length ( ) ) > ( org . restfulwhois . rdap . common . util . UpdateValidateUtil . MAX_LENGTH_PORT43 ) ) )
testNoDocumentsMarshallUnmarshall ( ) { org . jbpm . document . Documents docs = new org . jbpm . document . Documents ( ) ; byte [ ] marshalledDocuments = docsMarshallingStrategy . marshal ( null , null , docs ) ; org . jbpm . document . Documents unmarshalledDocuments = ( ( org . jbpm . document . Documents ) ( docsMarshallingStrategy . unmarshal ( null , null , marshalledDocuments , this . getClass ( ) . getClassLoader ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getDocuments ( ) { return java . util . Collections . unmodifiableList ( documents ) ; }
org . junit . Assert . assertEquals ( docs . getDocuments ( ) . size ( ) , unmarshalledDocuments . getDocuments ( ) . size ( ) )