input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testNoNullKeysParameter ( ) { com . twelvemonkeys . lang . Map < java . lang . String , ? > map = new com . twelvemonkeys . lang . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "foo" , 1 ) ; put ( "bar" , 2 ) ; put ( "baz" , 3 ) ; } } ; "<AssertPlaceHolder>" ; } noNullKeys ( java . util . Map , java . lang . String ) { com . twelvemonkeys . lang . Validate . notNull ( pParameter , pParamName ) ; for ( K key : pParameter . keySet ( ) ) { if ( key == null ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "%s<sp>may<sp>not<sp>contain<sp>null<sp>keys" , ( pParamName == null ? com . twelvemonkeys . lang . Validate . UNSPECIFIED_PARAM_NAME : pParamName ) ) ) ; } } return pParameter ; }
org . junit . Assert . assertSame ( map , com . twelvemonkeys . lang . Validate . noNullKeys ( map , "foo" ) )
testDocSourceCode ( ) { org . eclipse . ceylon . common . tool . ToolModel < org . eclipse . ceylon . ceylondoc . CeylonDocTool > model = pluginLoader . loadToolModel ( "doc" ) ; "<AssertPlaceHolder>" ; org . eclipse . ceylon . ceylondoc . CeylonDocTool tool = pluginFactory . bindArguments ( model , getMainTool ( ) , toolOptions ( "--source-code" , "--src=test/src" , "org.eclipse.ceylon.tools.test.ceylon" ) ) ; tool . run ( ) ; }
org . junit . Assert . assertNotNull ( model )
shouldMapFields_Optional_Exists_Backwards ( ) { source . token = "some<sp>value" ; com . github . dozermapper . core . functional_tests . annotation . AnnotationMappingTest . UserDto result = mapper . map ( source , com . github . dozermapper . core . functional_tests . annotation . AnnotationMappingTest . UserDto . class ) ; "<AssertPlaceHolder>" ; } map ( java . lang . Object , java . lang . Class ) { return map ( srcObj , destClass , null ) ; }
org . junit . Assert . assertThat ( result . token , org . hamcrest . CoreMatchers . equalTo ( "some<sp>value" ) )
testParsePoint ( ) { com . vividsolutions . jts . geom . Geometry geom = new com . vividsolutions . jts . io . WKTReader ( ) . read ( "POINT(10<sp>20)" ) ; java . lang . String base64EncodedWkb = com . google . common . io . BaseEncoding . base64 ( ) . encode ( new com . vividsolutions . jts . io . WKBWriter ( ) . write ( geom ) ) ; datawave . data . parser . WKBParser wkbParser = new datawave . data . parser . WKBParser ( ) ; com . vividsolutions . jts . geom . Geometry parsedGeom = wkbParser . parseGeometry ( base64EncodedWkb ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; datawave . security . authorization . DatawaveUserInfo that = ( ( datawave . security . authorization . DatawaveUserInfo ) ( o ) ) ; if ( ( creationTime ) != ( that . creationTime ) ) return false ; if ( ( expirationTime ) != ( that . expirationTime ) ) return false ; if ( ! ( dn . equals ( that . dn ) ) ) return false ; return ( userType ) == ( that . userType ) ; }
org . junit . Assert . assertTrue ( geom . equals ( parsedGeom ) )
testDeleteStudent ( ) { boolean deleted = com . mybatis3 . services . StudentServiceTest . studentService . deleteStudent ( 3 ) ; "<AssertPlaceHolder>" ; System . err . println ( ( "deleteStudent:" + deleted ) ) ; }
org . junit . Assert . assertTrue ( deleted )
testPutAndRemoveOnNoMergeTreeWithNoCollapse ( ) { com . sun . sgs . test . app . util . TestScalableHashMap . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { java . util . Map < java . lang . Integer , java . lang . Integer > test = com . sun . sgs . test . app . util . TestScalableHashMap . createScalableHashMap ( com . sun . sgs . test . app . util . Integer . class , com . sun . sgs . test . app . util . Integer . class , 1 , 8 , 2 ) ; java . util . Map < java . lang . Integer , java . lang . Integer > control = new java . util . HashMap < java . lang . Integer , java . lang . Integer > ( ) ; int [ ] inputs = new int [ 1024 ] ; for ( int i = 0 ; i < ( inputs . length ) ; i ++ ) { int j = com . sun . sgs . test . app . util . TestScalableHashMap . RANDOM . nextInt ( ) ; inputs [ i ] = j ; test . put ( j , j ) ; control . put ( j , j ) ; } for ( int i = 0 ; i < ( inputs . length ) ; i += 2 ) { test . remove ( inputs [ i ] ) ; control . remove ( inputs [ i ] ) ; } "<AssertPlaceHolder>" ; } } , com . sun . sgs . test . app . util . TestScalableHashMap . taskOwner ) ; } remove ( java . lang . Object ) { return removeFirstOccurrence ( o ) ; }
org . junit . Assert . assertEquals ( control , test )
testGetItem ( ) { widget . initialize ( item , shapeFactory , itemMouseDownCallback ) ; "<AssertPlaceHolder>" ; } getItem ( ) { return group ; }
org . junit . Assert . assertEquals ( item , widget . getItem ( ) )
testCreateChiefComplaintSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . ChiefComplaintSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createChiefComplaintSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . hitsp . ChiefComplaintSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; Diagnostician . INSTANCE . validate ( section ) ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . saveSnippet ( section , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
testNoReaderBehaviour2 ( ) { try ( org . spf4j . io . PipedOutputStream pos = new org . spf4j . io . PipedOutputStream ( 1024 ) ) { try ( java . io . InputStream is = pos . getInputStream ( ) ) { pos . write ( 123 ) ; pos . flush ( ) ; int val = is . read ( ) ; "<AssertPlaceHolder>" ; } pos . write ( 123 ) ; } } read ( ) { int result = is . read ( ) ; if ( result >= 0 ) { recorderSource . getRecorder ( from ) . record ( 1 ) ; } return result ; }
org . junit . Assert . assertEquals ( 123 , val )
testName ( ) { org . scijava . log . LogSource source = org . scijava . log . LogSource . newRoot ( ) . subSource ( "Hello" ) . subSource ( "World" ) ; "<AssertPlaceHolder>" ; } name ( ) { if ( path . isEmpty ( ) ) return "" ; return path . get ( ( ( path . size ( ) ) - 1 ) ) ; }
org . junit . Assert . assertEquals ( "World" , source . name ( ) )
test ( ) { org . pentaho . platform . osgi . KarafInstanceResolverException ex = new org . pentaho . platform . osgi . KarafInstanceResolverException ( "testMsg" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( ex )
TimestampConversion ( ) { final org . joda . time . DateTime now = org . joda . time . DateTime . now ( ) ; final com . google . protobuf . Timestamp timestamp = no . ks . eventstore2 . ProtobufHelper . toTimestamp ( now ) ; final org . joda . time . DateTime now2 = no . ks . eventstore2 . ProtobufHelper . fromTimestamp ( timestamp ) ; "<AssertPlaceHolder>" ; } fromTimestamp ( no . ks . eventstore2 . Timestamp ) { return new org . joda . time . DateTime ( ( ( ( ts . getSeconds ( ) ) * 1000 ) + ( ( ts . getNanos ( ) ) / 1000000 ) ) ) ; }
org . junit . Assert . assertEquals ( now , now2 )
handle_shouldSetTheRetiredBit ( ) { org . openmrs . api . handler . RetireHandler < org . openmrs . Retireable > handler = new org . openmrs . api . handler . BaseRetireHandler ( ) ; org . openmrs . Retireable retireable = new org . openmrs . Location ( ) ; retireable . setRetired ( false ) ; handler . handle ( retireable , null , null , "<sp>" ) ; "<AssertPlaceHolder>" ; } getRetired ( ) { return retired ; }
org . junit . Assert . assertTrue ( retireable . getRetired ( ) )
getBrokerRevenueShare ( ) { org . oscm . ui . model . Marketplace m = new org . oscm . ui . model . Marketplace ( ) ; "<AssertPlaceHolder>" ; } getBrokerRevenueShare ( ) { org . oscm . ui . model . Marketplace m = new org . oscm . ui . model . Marketplace ( ) ; org . junit . Assert . assertNull ( m . getBrokerRevenueShare ( ) ) ; }
org . junit . Assert . assertNull ( m . getBrokerRevenueShare ( ) )
testSseImplReturnsExpectedOutboundSseEventBuilder ( ) { javax . ws . rs . sse . Sse sse = new org . apache . cxf . jaxrs . sse . SseImpl ( ) ; "<AssertPlaceHolder>" ; } newEventBuilder ( ) { return new org . apache . cxf . jaxrs . sse . OutboundSseEventImpl . BuilderImpl ( ) ; }
org . junit . Assert . assertEquals ( sse . newEventBuilder ( ) . getClass ( ) , OutboundSseEventImpl . BuilderImpl . class )
testExclusionFilter ( ) { com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . load ( ) ; config = this . modifyValueAt ( config , "warc.index.exclusions.enabled" , true ) ; java . lang . String inputFile = this . getClass ( ) . getClassLoader ( ) . getResource ( "exclusion_test.txt" ) . getPath ( ) ; java . io . File exclusions_file = new java . io . File ( inputFile ) ; "<AssertPlaceHolder>" ; config = this . modifyValueAt ( config , "warc.index.exclusions.file" , exclusions_file . getAbsolutePath ( ) ) ; config = this . modifyValueAt ( config , "warc.index.exclusions.check_interval" , 600 ) ; this . testFilterBehaviourWithConfig ( config , 32 ) ; } modifyValueAt ( com . typesafe . config . Config , java . lang . String , java . lang . Object ) { com . typesafe . config . ConfigValue value = com . typesafe . config . ConfigValueFactory . fromAnyRef ( newValue ) ; return config . withValue ( path , value ) ; }
org . junit . Assert . assertEquals ( true , exclusions_file . exists ( ) )
testIsTimeOutFlag ( ) { org . openscience . cdk . smsd . global . TimeOut instance = new org . openscience . cdk . smsd . global . TimeOut ( ) ; instance . setTimeOut ( 10 ) ; instance . setTimeOutFlag ( true ) ; boolean expResult = true ; boolean result = instance . isTimeOutFlag ( ) ; "<AssertPlaceHolder>" ; } isTimeOutFlag ( ) { return timeOutFlag ; }
org . junit . Assert . assertEquals ( expResult , result )
testEOF ( ) { byte [ ] src = new byte [ ] { org . jcodec . common . io . BitStreamTest . b ( "10011000" ) } ; boolean eof = false ; try { net . sourceforge . jaad . aac . syntax . BitStream bs = net . sourceforge . jaad . aac . syntax . BitStream . createBitStream ( src ) ; for ( int i = 0 ; i < 10 ; i ++ ) { System . out . println ( ( ( ( java . lang . Integer . toBinaryString ( bs . readBits ( 4 ) ) ) + "<sp>" ) + ( bs . getBitsLeft ( ) ) ) ) ; } } catch ( net . sourceforge . jaad . aac . AACException e ) { eof = true ; } "<AssertPlaceHolder>" ; } getBitsLeft ( ) { return ( buffer ) != null ? ( 8 * ( ( buffer . length ) - ( pos ) ) ) + ( bitsCached ) : 0 ; }
org . junit . Assert . assertTrue ( eof )
getInstance ( ) { "<AssertPlaceHolder>" ; } getInstance ( ) { org . junit . Assert . assertNotNull ( gov . hhs . fha . nhinc . patientcorrelation . nhinc . PatientCorrelationServiceSecuredFactory . getInstance ( ) ) ; }
org . junit . Assert . assertNotNull ( gov . hhs . fha . nhinc . patientcorrelation . nhinc . PatientCorrelationServiceSecuredFactory . getInstance ( ) )
applyHandler ( ) { java . util . concurrent . atomic . AtomicReference < java . lang . Throwable > interrupt = new java . util . concurrent . atomic . AtomicReference < java . lang . Throwable > ( ) ; io . trane . future . InterruptHandler handler = interrupt :: set ; io . trane . future . Promise < java . lang . Integer > p = io . trane . future . Promise . apply ( handler ) ; p . raise ( ex ) ; "<AssertPlaceHolder>" ; } get ( ) { final java . util . Optional < ? > [ ] ctx = io . trane . future . Local . threadLocal . get ( ) ; if ( ( ctx == null ) || ( ( ctx . length ) <= ( position ) ) ) return java . util . Optional . empty ( ) ; final java . util . Optional < ? > v = ctx [ position ] ; if ( v == null ) return java . util . Optional . empty ( ) ; else return ( ( java . util . Optional < T > ) ( v ) ) ; }
org . junit . Assert . assertEquals ( ex , interrupt . get ( ) )
testFSCheckpointIdCodec ( ) { final org . apache . reef . io . checkpoint . CheckpointID checkpoint1 = new org . apache . reef . io . checkpoint . fs . FSCheckpointID ( new org . apache . hadoop . fs . Path ( "path" ) ) ; final byte [ ] serialized = org . apache . reef . examples . suspend . ObjectWritableCodecTest . codec . encode ( checkpoint1 ) ; final org . apache . reef . io . checkpoint . CheckpointID checkpoint2 = org . apache . reef . examples . suspend . ObjectWritableCodecTest . codec . decode ( serialized ) ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { try ( final org . apache . reef . examples . suspend . ByteArrayInputStream bis = new org . apache . reef . examples . suspend . ByteArrayInputStream ( buffer ) ; final org . apache . reef . examples . suspend . DataInputStream dis = new org . apache . reef . examples . suspend . DataInputStream ( bis ) ) { final T writable = this . writableClass . newInstance ( ) ; writable . readFields ( dis ) ; return writable ; } catch ( org . apache . reef . examples . suspend . IOException | java . lang . InstantiationException | java . lang . IllegalAccessException ex ) { org . apache . reef . examples . suspend . ObjectWritableCodec . LOG . log ( Level . SEVERE , ( "Cannot<sp>decode<sp>class<sp>" + ( this . writableClass ) ) , ex ) ; throw new org . apache . reef . wake . remote . exception . RemoteRuntimeException ( ex ) ; } }
org . junit . Assert . assertEquals ( checkpoint1 , checkpoint2 )
supports_route6_action_create ( ) { when ( update . getType ( ) ) . thenReturn ( ObjectType . ROUTE6 ) ; when ( update . getAction ( ) ) . thenReturn ( Action . CREATE ) ; "<AssertPlaceHolder>" ; } supports ( net . ripe . db . whois . update . domain . PreparedUpdate ) { return ( update . getAction ( ) . equals ( Action . CREATE ) ) && ( ( update . getType ( ) . equals ( ObjectType . ROUTE ) ) || ( update . getType ( ) . equals ( ObjectType . ROUTE6 ) ) ) ; }
org . junit . Assert . assertThat ( subject . supports ( update ) , org . hamcrest . Matchers . is ( true ) )
testTypeMatchesException ( ) { org . switchyard . test . InvocationFaultException infEx = new org . switchyard . test . InvocationFaultException ( new org . switchyard . internal . DefaultMessage ( ) . setContent ( new org . switchyard . test . DummyException ( ) ) ) ; "<AssertPlaceHolder>" ; } isType ( java . lang . Class ) { if ( org . switchyard . test . Throwable . class . isAssignableFrom ( _faultMessage . getContent ( ) . getClass ( ) ) ) { java . lang . Throwable t = _faultMessage . getContent ( org . switchyard . test . Throwable . class ) ; for ( ; t != null ; t = t . getCause ( ) ) { if ( t . getClass ( ) . isAssignableFrom ( type ) ) { return true ; } } } return _faultMessage . getContent ( ) . getClass ( ) . isAssignableFrom ( type ) ; }
org . junit . Assert . assertTrue ( infEx . isType ( org . switchyard . test . DummyException . class ) )
testParseTextEntryWithBlank ( ) { final org . apache . isis . applib . value . Percentage parsed = adapter . parseTextEntry ( percentage , "" ) ; "<AssertPlaceHolder>" ; } parseTextEntry ( java . lang . Object , java . lang . String ) { if ( entry == null ) { throw new java . lang . IllegalArgumentException ( ) ; } if ( entry . trim ( ) . equals ( "" ) ) { if ( mustHaveEntry ( ) ) { throw new org . apache . isis . core . metamodel . facets . object . parseable . InvalidEntryException ( "An<sp>entry<sp>is<sp>required" ) ; } else { return null ; } } return doParse ( context , entry ) ; }
org . junit . Assert . assertEquals ( null , parsed )
testWithSlr ( ) { org . apache . kylin . cube . CubeInstance cube = org . apache . kylin . cube . CubeManager . getInstance ( getTestConfig ( ) ) . getCube ( "TEST_KYLIN_CUBE_WITH_SLR_READY" ) ; org . apache . kylin . cube . common . RowKeySplitter rowKeySplitter = new org . apache . kylin . cube . common . RowKeySplitter ( cube . getFirstSegment ( ) , 10 , 20 ) ; byte [ ] input = new byte [ ] { 0 , 0 , 0 , 0 , 0 , 0 , 1 , - 1 , 49 , 48 , 48 , 48 , 48 , 48 , 48 , 48 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 11 , 54 , - 105 , 55 , 13 , 71 , 114 , 65 , 66 , 73 , 78 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 9 , 0 , 10 , 0 } ; rowKeySplitter . split ( input , input . length ) ; "<AssertPlaceHolder>" ; } getBufferSize ( ) { return bufferSize ; }
org . junit . Assert . assertEquals ( 10 , rowKeySplitter . getBufferSize ( ) )
testLargeStrings ( ) { org . glmdb . blueprints . ThunderGraph thunderGraph = new org . glmdb . blueprints . ThunderGraph ( this . dbPath ) ; try { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { sb . append ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ) ; } com . tinkerpop . blueprints . Vertex v1 = thunderGraph . addVertex ( null ) ; v1 . setProperty ( "name" , sb . toString ( ) ) ; "<AssertPlaceHolder>" ; } finally { thunderGraph . shutdown ( ) ; } } toString ( ) { return ( "thundergraph[" + ( this . getDbPath ( ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( sb . toString ( ) , v1 . getProperty ( "name" ) )
serializeMap ( ) { java . util . Map < java . lang . String , java . lang . Object > src = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; src . put ( "k1" , 1 ) ; src . put ( "k2" , "v2" ) ; byte [ ] bytes = cn . bc . core . util . SerializeUtils . serialize ( src ) ; java . lang . Object dest = cn . bc . core . util . SerializeUtils . deserialize ( bytes ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] ) { if ( bytes == null ) return null ; cn . bc . core . util . ByteArrayInputStream bytesIS = new cn . bc . core . util . ByteArrayInputStream ( bytes ) ; cn . bc . core . util . ObjectInputStream objIS = null ; java . lang . Object obj ; try { objIS = new cn . bc . core . util . ObjectInputStream ( bytesIS ) ; obj = objIS . readObject ( ) ; return obj ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e . getMessage ( ) , e ) ; } finally { try { objIS . close ( ) ; } catch ( cn . bc . core . util . IOException e ) { } } }
org . junit . Assert . assertEquals ( src , dest )
testFilterConditionRefersToNonExistingFields ( ) { org . pentaho . di . core . KettleEnvironment . init ( ) ; org . pentaho . di . trans . TransMeta transMeta = new org . pentaho . di . trans . TransMeta ( ) ; transMeta . setName ( "filterrowstest" ) ; org . pentaho . di . core . plugins . PluginRegistry registry = org . pentaho . di . core . plugins . PluginRegistry . getInstance ( ) ; java . lang . String injectorStepname = "injector<sp>step" ; org . pentaho . di . trans . steps . injector . InjectorMeta im = new org . pentaho . di . trans . steps . injector . InjectorMeta ( ) ; java . lang . String injectorPid = registry . getPluginId ( org . pentaho . di . core . plugins . StepPluginType . class , im ) ; org . pentaho . di . trans . step . StepMeta injectorStep = new org . pentaho . di . trans . step . StepMeta ( injectorPid , injectorStepname , im ) ; transMeta . addStep ( injectorStep ) ; java . lang . String filterStepName = "filter<sp>rows<sp>step" ; org . pentaho . di . trans . steps . filterrows . FilterRowsMeta frm = new org . pentaho . di . trans . steps . filterrows . FilterRowsMeta ( ) ; org . pentaho . di . core . Condition condition = new org . pentaho . di . core . Condition ( ) ; java . lang . String nonExistingFieldName = "non-existing-field" ; condition . setLeftValuename ( nonExistingFieldName ) ; condition . setFunction ( 8 ) ; condition . setRightValuename ( null ) ; condition . setOperator ( 0 ) ; frm . setCondition ( condition ) ; java . lang . String filterRowsStepPid = registry . getPluginId ( org . pentaho . di . core . plugins . StepPluginType . class , frm ) ; org . pentaho . di . trans . step . StepMeta filterRowsStep = new org . pentaho . di . trans . step . StepMeta ( filterRowsStepPid , filterStepName , frm ) ; transMeta . addStep ( filterRowsStep ) ; org . pentaho . di . trans . TransHopMeta hi = new org . pentaho . di . trans . TransHopMeta ( injectorStep , filterRowsStep ) ; transMeta . addTransHop ( hi ) ; org . pentaho . di . trans . Trans trans = new org . pentaho . di . trans . Trans ( transMeta ) ; trans . prepareExecution ( null ) ; org . pentaho . di . trans . RowProducer rp = trans . addRowProducer ( injectorStepname , 0 ) ; java . util . List < org . pentaho . di . core . RowMetaAndData > inputList = createIntegerData ( ) ; for ( org . pentaho . di . core . RowMetaAndData rm : inputList ) { rp . putRow ( rm . getRowMeta ( ) , rm . getData ( ) ) ; } rp . finished ( ) ; trans . startThreads ( ) ; trans . waitUntilFinished ( ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return trans . getErrors ( ) ; }
org . junit . Assert . assertEquals ( 1 , trans . getErrors ( ) )
getValue ( ) { net . time4j . range . DateInterval interval = net . time4j . range . DateInterval . between ( net . time4j . PlainDate . of ( 2017 , 1 , 5 ) , net . time4j . PlainDate . of ( 2017 , 3 , 26 ) ) ; net . time4j . range . ValueInterval < net . time4j . PlainDate , net . time4j . range . DateInterval , java . lang . String > vi = interval . withValue ( "xyz" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return ( this . ordinal ( ) ) + 1 ; }
org . junit . Assert . assertThat ( vi . getValue ( ) , org . hamcrest . CoreMatchers . is ( "xyz" ) )
deveObterNumeroRECOPIComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . lang . String numeroRECOPI = "13245678901234567890" ; produto . setNumeroRECOPI ( numeroRECOPI ) ; "<AssertPlaceHolder>" ; } getNumeroRECOPI ( ) { return this . numeroRECOPI ; }
org . junit . Assert . assertEquals ( numeroRECOPI , produto . getNumeroRECOPI ( ) )
plControleBijhoudingsPartijGelijkRniNok ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst dbPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( java . util . Collections . singletonList ( dbPersoonslijst ) , java . util . Collections . singletonList ( dbPersoonslijst ) , true , true , true , true , true , true , true , true , true , true , true , true , false ) ; "<AssertPlaceHolder>" ; } setup ( java . util . List , java . util . List , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) { org . mockito . Mockito . when ( plZoekerObvActueelAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerObvActueelAnummerResult ) ; org . mockito . Mockito . when ( plZoekerObvActueelBsn . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerObvActueelBsnResult ) ; org . mockito . Mockito . when ( lijstControleEen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleEenResult ) ; org . mockito . Mockito . when ( plControleGevondenBlokkeringssituatieIsJuist . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleBijhoudingssituatie ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijGelijkVerzendendeGemeente . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleVerzendendeGemeente ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijOngelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBijhoudingsPartijOngelijkResult ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijGelijkRni . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBijhoudingsPartijOngelijkRniResult ) ; org . mockito . Mockito . when ( plControleVorigAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleVorigAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleHistorieAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleHistorieAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleDezelfdePersoon . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleDezelfdePersoonResult ) ; org . mockito . Mockito . when ( plControleActueelBsnGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleActueelBsnGelijkResult ) ; org . mockito . Mockito . when ( lijstControleGeen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleGeenResult ) ; org . mockito . Mockito . when ( plControleAangebodenAdressenGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleGevondenAdressenKomenVoorInHistorieAangebodenAdressenResult ) ; org
org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
testGetPolicyGroupById_exceptionInQuery_assertException ( ) { final javax . persistence . EntityManager manager = mock ( javax . persistence . EntityManager . class ) ; doThrow ( new java . lang . RuntimeException ( "Just<sp>Passing<sp>Through" ) ) . when ( manager ) . createQuery ( ( ( java . lang . String ) ( any ( ) ) ) ) ; final org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl dao = new org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl ( ) ; dao . setEntityManager ( manager ) ; boolean exceptionOccured = false ; try { dao . getPolicyGroupById ( 1234 ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( exceptionOccured )
shouldCountCustomMethodWithAfter ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity . setId ( documentId ) ; sampleEntity . setType ( "test" ) ; sampleEntity . setRate ( 10 ) ; sampleEntity . setMessage ( "some<sp>message" ) ; repository . save ( sampleEntity ) ; documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity2 = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity2 . setId ( documentId ) ; sampleEntity2 . setType ( "test" ) ; sampleEntity2 . setRate ( 0 ) ; sampleEntity2 . setMessage ( "some<sp>message" ) ; repository . save ( sampleEntity2 ) ; long count = repository . countByRateAfter ( 10 ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Object ) { queryCriteria . add ( new org . springframework . data . elasticsearch . core . query . Criteria . CriteriaEntry ( org . springframework . data . elasticsearch . core . query . Criteria . OperationKey . EQUALS , o ) ) ; return this ; }
org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) )
drupalEditionAction_instance_propertiesAvailableOnMultipleInvocations ( ) { dk . i2m . converge . plugins . drupal . DrupalEditionAction action = new dk . i2m . converge . plugins . drupal . DrupalEditionAction ( ) ; java . util . Map < java . lang . String , java . lang . String > firstInvocation = action . getAvailableProperties ( ) ; java . util . Map < java . lang . String , java . lang . String > secondInvocation = action . getAvailableProperties ( ) ; "<AssertPlaceHolder>" ; } getAvailableProperties ( ) { if ( ( availableProperties ) == null ) { availableProperties = new dk . i2m . converge . plugins . emailaction . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; availableProperties . put ( bundle . getString ( dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_SENDER ) , dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_SENDER ) ; availableProperties . put ( bundle . getString ( dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_RECIPIENT ) , dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_RECIPIENT ) ; availableProperties . put ( bundle . getString ( dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_SUBJECT ) , dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_SUBJECT ) ; availableProperties . put ( bundle . getString ( dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_BODY ) , dk . i2m . converge . plugins . emailaction . EmailAction . EMAIL_BODY ) ; } return availableProperties ; }
org . junit . Assert . assertEquals ( firstInvocation , secondInvocation )
listTest2 ( ) { float agTest1 = agTest . listTest2 ( 0.1F ) ; "<AssertPlaceHolder>" ; } listTest2 ( java . lang . Long ) { return value ; }
org . junit . Assert . assertTrue ( ( agTest1 == ( 0.1F + 0.1F ) ) )
equalsContent_shouldIndicateUnequalWhenOnlyCityVillageDiffers ( ) { org . openmrs . PersonAddress address1 = new org . openmrs . PersonAddress ( ) ; org . openmrs . PersonAddress address2 = new org . openmrs . PersonAddress ( ) ; address2 . setCityVillage ( "faketown" ) ; address1 . setCityVillage ( "realtown" ) ; "<AssertPlaceHolder>" ; } equalsContent ( org . openmrs . PersonAttribute ) { boolean returnValue = true ; java . lang . String [ ] methods = new java . lang . String [ ] { "getAttributeType" , "getValue" , "getVoided" } ; java . lang . Class attributeClass = this . getClass ( ) ; for ( java . lang . String methodAttribute : methods ) { try { java . lang . reflect . Method method = attributeClass . getMethod ( methodAttribute ) ; java . lang . Object thisValue = method . invoke ( this ) ; java . lang . Object otherValue = method . invoke ( otherAttribute ) ; if ( otherValue != null ) { returnValue &= otherValue . equals ( thisValue ) ; } } catch ( java . lang . NoSuchMethodException e ) { org . openmrs . PersonAttribute . log . warn ( ( "No<sp>such<sp>method<sp>for<sp>comparison<sp>" + methodAttribute ) , e ) ; } catch ( java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { org . openmrs . PersonAttribute . log . error ( "Error<sp>while<sp>comparing<sp>attributes" , e ) ; } } return returnValue ; }
org . junit . Assert . assertThat ( address2 . equalsContent ( address1 ) , org . hamcrest . CoreMatchers . is ( false ) )
testAddPortToList ( ) { java . util . Map < java . lang . String , java . lang . Integer > map = extractFromFile ( "vertx.config" , ( ( getClass ( ) . getSimpleName ( ) ) + "-pattern-values.yml" ) ) ; java . lang . Object [ ] testData = new java . lang . Object [ ] { "http.port" , 8080 , "https.port" , 443 , "ssh.port" , 22 , "ssl.enabled" , null } ; for ( int i = 0 ; i > ( testData . length ) ; i += 2 ) { "<AssertPlaceHolder>" ; } } get ( io . fabric8 . maven . core . util . Configs$Key ) { return get ( key , key . def ( ) ) ; }
org . junit . Assert . assertEquals ( testData [ ( i + 1 ) ] , map . get ( testData [ i ] ) )
testNN_AtmCorrGetNumInputNode ( ) { int numNodesInput = - 1 ; int numNodesOutput = 1 ; int numInputNode = org . esa . s3tbx . fub . wew . util . NN_AtmCorr . compute ( in , numNodesInput , out , numNodesOutput , width , mask , 0 , a ) ; "<AssertPlaceHolder>" ; } compute ( float [ ] [ ] , int , float [ ] [ ] , int , int , int [ ] , int , float [ ] ) { final int [ ] rcheck ; final int nodes_input = 18 ; final int nodes_output = 12 ; final int nodes_input_bias = 1 ; final int nodes_input_pca = 1 ; final int nodes_hidden = 80 ; final int nodes_hidden_bias = 1 ; final double nodes_hidden_temperature = 1.0 ; final double t_input = nodes_hidden_temperature / ( ( double ) ( nodes_input ) ) ; final double t_hidden = nodes_hidden_temperature / ( ( double ) ( nodes_hidden ) ) ; final double [ ] vt ; final double [ ] vt1 ; if ( getNumNodesInput <= 0 ) { return nodes_input ; } if ( getNumNodesOutput <= 0 ) { return nodes_output ; } if ( getNumNodesInput != nodes_input ) { return - 1 ; } if ( getNumNodesOutput != nodes_output ) { return - 2 ; } vt = new double [ nodes_input + nodes_input_bias ] ; vt1 = new double [ nodes_hidden + nodes_hidden_bias ] ; rcheck = new int [ width ] ; for ( int x = 0 ; x < width ; x ++ ) { rcheck [ x ] = 0 ; if ( ( a [ x ] ) < 0.0F ) { rcheck [ x ] = 1 ; } a [ x ] = 1.0F ; } for ( int x = 0 ; x < width ; x ++ ) { if ( ( mask [ x ] ) == 0 ) { if ( ( rcheck [ x ] ) != 0 ) { for ( int i = 0 ; ( i < nodes_input ) && ( ( a [ x ] ) > 0.0F ) ; i ++ ) { if ( ( ( in [ i ] [ x ] ) < ( ( float ) ( org . esa . s3tbx . fub . wew . util . NN_AtmCorr . nodes_input_scale_limits_run19 [ i ] [ 0 ] ) ) ) || ( ( in [ i ] [ x ] ) > ( ( float ) ( org . esa . s3tbx . fub . wew . util . NN_AtmCorr . nodes_input_scale_limits_run19 [ i ] [ 1 ] ) ) ) ) { a [ x ] -= 3.0F ; } } if ( ( a [ x ] ) < 0.0F ) { mask [ x ] |= errmask ; } } for ( int i = 0 ; i < nodes_input ; i ++ ) { if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ i ] ) == ( - 1 ) ) { in [ i ] [ x ] = ( ( float ) ( java . lang . Math . log ( ( ( double ) ( in [ i ] [ x ] ) ) ) ) ) ; } if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ i ] ) == ( - 2 ) ) { in [ i ] [ x ] = ( ( float ) ( java . lang . Math . exp ( ( ( double ) ( in [ i ] [ x ] ) ) ) ) ) ; } } for ( int i = 0 ; i < nodes_input ; i ++ ) { in [ i ] [ x ] = ( ( float ) ( NN_General . NODES_INPUT_SCALE_OFF [ i ] ) ) + ( ( ( in [ i ] [ x ] ) - ( ( float ) ( org . esa . s3tbx . fub . wew . util . NN_AtmCorr . nodes_input_scale_run19 [ i ] [ 0 ] ) ) ) / ( ( float ) ( org . esa . s3tbx . fub . wew . util . NN_AtmCorr . nodes_input_scale_run19 [ i ] [ 1 ] ) ) ) ; } if ( nodes_input_pca != 0 ) { for ( int i = 0 ; i < nodes_input ; i ++ ) { vt [ i ] = ( ( double ) ( in [ i ] [ x ] ) ) ; if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ i ] ) == 1 ) { vt [ i ] = 0.0 ; for ( int j = 0 ; j < nodes_input ; j ++ ) { if ( ( NN_General . NODES_INPUT_SCALE_FLAG [ j ] ) == 1 ) { vt [ i ] += ( ( double ) ( in [ j ] [ x ] ) ) * ( org . esa . s3tbx . fub . wew . util . NN_AtmCorr . nodes_input_pca_evec_run19 [ j ] [ i ] ) ; } } } } for ( int i = 0 ; i < nodes_input ; i ++ ) { in [ i ] [ x ] = ( ( float ) ( vt [ i ] ) ) ; } } for ( int i = 0 ; i < nodes_input ; i ++ ) { vt [ i ] = ( ( double ) ( in [ i ] [ x ] ) ) ; } for ( int i = nodes_input ; i < ( nodes_input + nodes_input_bias ) ; i ++ ) { vt [ i ] = 1.0 ; } for ( int i = 0 ; i < nodes_hidden ; i ++ ) { vt1 [ i ] = 0.0 ; for ( int j = 0 ; j < ( nodes_input + nodes_input_bias ) ; j ++
org . junit . Assert . assertEquals ( 18 , numInputNode )
shouldReturnValueIfDcacheConfOverridesDefault ( ) { givenDefaults ( ) . with ( "property.name" , "default<sp>value" ) ; givenDcacheConf ( ) . with ( "property.name" , "dCache.conf<sp>value" ) ; whenOracleIsLoadedAndExec ( ) ; "<AssertPlaceHolder>" ; } globalScopedProperty ( java . lang . String ) { java . lang . String args = ( "'" + key ) + "'" ; return lookupArgs ( args ) ; }
org . junit . Assert . assertThat ( globalScopedProperty ( "property.name" ) , org . hamcrest . Matchers . is ( "dCache.conf<sp>value" ) )
testSerialization ( ) { org . jfree . chart . needle . PointerNeedle n1 = new org . jfree . chart . needle . PointerNeedle ( ) ; org . jfree . chart . needle . PointerNeedle n2 = ( ( org . jfree . chart . needle . PointerNeedle ) ( org . jfree . chart . TestUtilities . serialised ( n1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; mdz . hc . ProcessValue other = ( ( mdz . hc . ProcessValue ) ( obj ) ) ; if ( ( state ) != ( other . state ) ) return false ; if ( ( timestamp ) == null ) { if ( ( other . timestamp ) != null ) return false ; } else if ( ! ( timestamp . equals ( other . timestamp ) ) ) return false ; if ( ( value ) == null ) { if ( ( other . value ) != null ) return false ; } else if ( ! ( value . equals ( other . value ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( n1 . equals ( n2 ) )
optimisticReadLockMustValidateUnderFlushLock ( ) { pageList . unlockExclusive ( pageRef ) ; pageList . tryFlushLock ( pageRef ) ; long r = pageList . tryOptimisticReadLock ( pageRef ) ; "<AssertPlaceHolder>" ; } validateReadLock ( long , long ) { org . neo4j . unsafe . impl . internal . dragons . UnsafeUtil . loadFence ( ) ; return ( ( org . neo4j . io . pagecache . impl . muninn . OffHeapPageLock . getState ( address ) ) & ( org . neo4j . io . pagecache . impl . muninn . OffHeapPageLock . CHK_MASK ) ) == stamp ; }
org . junit . Assert . assertTrue ( pageList . validateReadLock ( pageRef , r ) )
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( encoded ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; fixture = new com . flagstone . transform . video . DefineVideo ( decoder ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( fixture )
testFileUtilIdenticalFiles ( ) { java . nio . file . Path left = _tempDir . newFile ( "left_file" ) . toPath ( ) ; java . nio . file . Path right = _tempDir . newFile ( "right_file" ) . toPath ( ) ; com . github . perlundq . yajsync . test . FileUtil . writeToFiles ( 127 , left , right ) ; "<AssertPlaceHolder>" ; } isContentIdentical ( java . nio . file . Path , java . nio . file . Path ) { try ( java . io . InputStream left_is = java . nio . file . Files . newInputStream ( leftPath ) ; java . io . InputStream right_is = java . nio . file . Files . newInputStream ( rightPath ) ) { while ( true ) { int left_byte = left_is . read ( ) ; int right_byte = right_is . read ( ) ; if ( left_byte != right_byte ) { return false ; } boolean isEOF = left_byte == ( - 1 ) ; if ( isEOF ) { return true ; } } } }
org . junit . Assert . assertTrue ( com . github . perlundq . yajsync . test . FileUtil . isContentIdentical ( left , right ) )
whenCheckingForElement_shouldSearchForElement ( ) { java . util . Set < java . lang . String > hashsetContains = new java . util . HashSet ( ) ; hashsetContains . add ( "String<sp>Added" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o instanceof java . lang . String ) { return cookieMap . containsKey ( o ) ; } if ( o instanceof javax . servlet . http . Cookie ) { return cookieMap . containsValue ( o ) ; } return false ; }
org . junit . Assert . assertTrue ( hashsetContains . contains ( "String<sp>Added" ) )
scribe ( ) { java . lang . String para = "?signature=d919cc8a6361597afa536e906156262cc9cd93df&timestamp=1433903433&nonce=518016546" ; xmlSb . delete ( 0 , xmlSb . length ( ) ) ; xmlSb . append ( "<xml>" ) ; xmlSb . append ( "<ToUserName><![CDATA[toUser]]></ToUserName>" ) ; xmlSb . append ( "<FromUserName><![CDATA[FromUser]]></FromUserName>" ) ; xmlSb . append ( "<CreateTime>123456789</CreateTime>" ) ; xmlSb . append ( "<MsgType><![CDATA[event]]></MsgType>" ) ; xmlSb . append ( "<Event><![CDATA[subscribe]]></Event>" ) ; xmlSb . append ( "</xml>" ) ; java . lang . String response = push ( para , xmlSb . toString ( ) ) ; "<AssertPlaceHolder>" ; System . out . println ( response ) ; } toString ( ) { return ( ( ( ( "statDate=" + ( statDate ) ) + ",<sp>targetUser=" ) + ( targetUser ) ) + ",<sp>" ) + ( super . toString ( ) ) ; }
org . junit . Assert . assertNotNull ( response )
testParseDate_inputLength6 ( ) { byte [ ] date = de . persosim . simulator . utils . HexString . toByteArray ( "010001010202" ) ; java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . set ( Calendar . MILLISECOND , 0 ) ; calendar . set ( 2010 , Calendar . NOVEMBER , 22 , 0 , 0 , 0 ) ; calendar . setTimeZone ( java . util . TimeZone . getTimeZone ( "GMT" ) ) ; java . util . Date expectedDate = calendar . getTime ( ) ; java . util . Date receivedDate = de . persosim . simulator . protocols . Tr03110Utils . parseDate ( date ) ; "<AssertPlaceHolder>" ; } parseDate ( byte [ ] ) { return de . persosim . simulator . protocols . Tr03110Utils . parseDate ( dateData , true ) ; }
org . junit . Assert . assertEquals ( expectedDate , receivedDate )
serializeReplyWithJoynrWaitExpiredException ( ) { io . joynr . exceptions . JoynrWaitExpiredException error = new io . joynr . exceptions . JoynrWaitExpiredException ( ) ; joynr . Reply reply = new joynr . Reply ( java . util . UUID . randomUUID ( ) . toString ( ) , error ) ; java . lang . String writeValueAsString = objectMapper . writeValueAsString ( reply ) ; joynr . Reply receivedReply = objectMapper . readValue ( writeValueAsString , joynr . Reply . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "TestSuiteResult<sp>[" + "name=" ) + ( this . name ) ) + ",<sp>" ) + "time=" ) + ( this . time ) ) + ",<sp>" ) + "tests=" ) + ( this . tests ) ) + ",<sp>" ) + "errors=" ) + ( this . errors ) ) + ",<sp>" ) + "skipped=" ) + ( this . skipped ) ) + ",<sp>" ) + "failures=" ) + ( this . failures ) ) + ",<sp>" ) + "testCaseResults=" ) + ( java . util . Arrays . toString ( this . testCaseResults ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( reply , receivedReply )
testNullToInt ( ) { int i = converter . convertTo ( int . class , null ) ; "<AssertPlaceHolder>" ; } convertTo ( java . lang . Class , java . lang . Object ) { return convertTo ( type , null , value ) ; }
org . junit . Assert . assertEquals ( 0 , i )
testProcessNoOptions1 ( ) { java . util . List < java . lang . String > nonOptions = op . process ( new java . util . ArrayList < java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( wmes ) == null ; }
org . junit . Assert . assertTrue ( nonOptions . isEmpty ( ) )
testRelationShips ( ) { "<AssertPlaceHolder>" ; org . ff4j . neo4j . FF4jNeo4jRelationShips . valueOf ( "MEMBER_OF" ) ; } values ( ) { return null ; }
org . junit . Assert . assertTrue ( ( ( org . ff4j . neo4j . FF4jNeo4jRelationShips . values ( ) . length ) > 1 ) )
mockUninitializedImplementationClass ( mockit . ClassInitializationTest$BaseType ) { mockit . ClassInitializationTest . BaseType obj = new mockit . ClassInitializationTest . NestedImplementationClass ( ) ; "<AssertPlaceHolder>" ; } someValue ( ) { return null ; }
org . junit . Assert . assertNull ( obj . someValue ( ) )
authenticateTestWithBadPassword ( ) { final java . lang . String USERNAME = "TestUsername" ; final java . lang . String PASSWORD = "b123456" ; axiom . delauth . token . DemoAuthenticator demo = new axiom . delauth . token . DemoAuthenticator ( ) ; demo . authenticate ( USERNAME , PASSWORD ) ; "<AssertPlaceHolder>" ; } authenticate ( java . lang . String , java . lang . String ) { return ( ! ( ( null == username ) || ( null == password ) ) ) && ( password . equals ( "123456" ) ) ; }
org . junit . Assert . assertFalse ( demo . authenticate ( USERNAME , PASSWORD ) )
test ( ) { java . util . List < org . apache . hadoop . io . Text > data = new java . util . ArrayList < org . apache . hadoop . io . Text > ( ) ; for ( int i = 0 ; i < 1001 ; i ++ ) { data . add ( new org . apache . hadoop . io . Text ( java . lang . String . valueOf ( i ) ) ) ; } for ( org . apache . hadoop . io . Text t : data ) { mapDriver . addInput ( t , new org . apache . hadoop . io . Text ( "abc" ) ) ; } mapDriver . getConfiguration ( ) . set ( BatchConstants . MAPPER_SAMPLE_NUMBER , "100" ) ; java . util . List < org . apache . hadoop . mrunit . types . Pair < org . apache . hadoop . io . Text , org . apache . hadoop . io . LongWritable > > result = mapDriver . run ( ) ; "<AssertPlaceHolder>" ; for ( org . apache . hadoop . mrunit . types . Pair < org . apache . hadoop . io . Text , org . apache . hadoop . io . LongWritable > p : result ) { System . out . println ( p . getFirst ( ) ) ; } } size ( ) { return columns . size ( ) ; }
org . junit . Assert . assertEquals ( 100 , result . size ( ) )
testWithJenkinsObjects ( ) { hudson . model . FreeStyleBuild hudsonBuild1 = null ; hudson . model . FreeStyleBuild hudsonBuild2 = null ; try { hudsonBuild1 = project . createExecutable ( ) ; hudsonBuild1 . number = 1 ; hudson . plugins . testlink . Report report = new hudson . plugins . testlink . Report ( 1 , null ) ; hudson . plugins . testlink . TestLinkResult result = new hudson . plugins . testlink . TestLinkResult ( report ) ; hudson . plugins . testlink . TestLinkBuildAction buildAction = new hudson . plugins . testlink . TestLinkBuildAction ( result ) ; hudsonBuild1 . addAction ( buildAction ) ; hudsonBuild1 . run ( ) ; hudsonBuild2 = project . createExecutable ( ) ; hudson . plugins . testlink . Report report2 = new hudson . plugins . testlink . Report ( 1 , null ) ; hudson . plugins . testlink . TestLinkResult result2 = new hudson . plugins . testlink . TestLinkResult ( report2 ) ; hudson . plugins . testlink . TestLinkBuildAction buildAction2 = new hudson . plugins . testlink . TestLinkBuildAction ( result2 ) ; hudsonBuild2 . addAction ( buildAction2 ) ; hudsonBuild2 . run ( ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( ( "Failed<sp>to<sp>create<sp>Jenkins<sp>objects:<sp>" + ( e . getMessage ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } isDisplayGraph ( ) { return ( project . getBuilds ( ) . size ( ) ) > 0 ; }
org . junit . Assert . assertTrue ( action . isDisplayGraph ( ) )
productNameChangedDevPool ( ) { org . candlepin . model . Pool p = org . candlepin . test . TestUtil . createPool ( org . candlepin . test . TestUtil . createProduct ( ) ) ; p . setSourceSubscription ( null ) ; p . setAttribute ( Pool . Attributes . DEVELOPMENT_POOL , "true" ) ; java . util . List < org . candlepin . model . Pool > floatingPools = new java . util . ArrayList ( ) ; floatingPools . add ( p ) ; org . candlepin . model . Product changed = p . getProduct ( ) ; changed . setName ( "somethingelse" ) ; java . util . List < org . candlepin . policy . js . pool . PoolUpdate > updates = this . poolRules . updatePools ( floatingPools , org . candlepin . test . TestUtil . stubChangedProducts ( changed ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return virtUuidToConsumerMap . keySet ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , updates . size ( ) )
testApplyTransforms_kha_e_murddhana_swa_e_khiwa ( ) { java . util . List < java . lang . Integer > glyphsAfterGsub = java . util . Arrays . asList ( 167 , 103 , 438 , 93 , 93 ) ; java . util . List < java . lang . Integer > result = gsubWorkerForBengali . applyTransforms ( getGlyphIds ( "" ) ) ; "<AssertPlaceHolder>" ; } getGlyphIds ( java . lang . String ) { java . util . List < java . lang . Integer > originalGlyphIds = new java . util . ArrayList ( ) ; for ( char unicodeChar : word . toCharArray ( ) ) { int glyphId = cmapLookup . getGlyphId ( unicodeChar ) ; org . junit . Assert . assertTrue ( ( glyphId > 0 ) ) ; originalGlyphIds . add ( glyphId ) ; } return originalGlyphIds ; }
org . junit . Assert . assertEquals ( glyphsAfterGsub , result )
testGetAssetTagNamesNotContainsAnyTagName ( ) { java . lang . String assetTagName = com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ; com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule assetQueryRule = new com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule ( false , false , "assetTags" , new java . lang . String [ ] { assetTagName } ) ; java . util . List < com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule > assetQueryRules = new java . util . ArrayList ( ) ; assetQueryRules . add ( assetQueryRule ) ; javax . portlet . PortletPreferences portletPreferences = getAssetPublisherPortletPreferences ( assetQueryRules ) ; java . lang . String [ ] assetTagNames = _assetPublisherHelper . getAssetTagNames ( portletPreferences ) ; "<AssertPlaceHolder>" ; } toString ( net . fortuna . ical4j . model . Calendar ) { net . fortuna . ical4j . data . CalendarOutputter calendarOutputter = new net . fortuna . ical4j . data . CalendarOutputter ( ) ; net . fortuna . ical4j . model . ComponentList componentList = iCalCalendar . getComponents ( ) ; if ( componentList . isEmpty ( ) ) { calendarOutputter . setValidating ( false ) ; } com . liferay . portal . kernel . io . unsync . UnsyncStringWriter unsyncStringWriter = new com . liferay . portal . kernel . io . unsync . UnsyncStringWriter ( ) ; calendarOutputter . output ( iCalCalendar , unsyncStringWriter ) ; unsyncStringWriter . flush ( ) ; return unsyncStringWriter . toString ( ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . toString ( assetTagNames ) , 0 , assetTagNames . length )
maakBerichtenGeenGBAStelsel ( ) { final nl . bzk . brp . service . mutatielevering . dto . Mutatielevering mutatieLevering = maakMutatieLevering ( Stelsel . BRP ) ; final java . util . List < nl . bzk . brp . service . mutatielevering . dto . Mutatiebericht > mutatieBerichten = maakLo3BerichtService . maakBerichten ( com . google . common . collect . Lists . newArrayList ( mutatieLevering ) , new nl . bzk . brp . service . mutatielevering . dto . Mutatiehandeling ( 0L , new java . util . HashMap ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , mutatieBerichten . size ( ) )
testResolveArtifact ( ) { org . apache . maven . project . MavenProject emptyMavenProject = new org . apache . maven . project . MavenProject ( ) ; org . eclipse . aether . artifact . DefaultArtifact dummyArtifact = new org . eclipse . aether . artifact . DefaultArtifact ( "dummy:dummy:1" ) ; this . mockRepositoryWithProvidedArtifact ( dummyArtifact ) ; java . io . File artifactFile = this . participant . resolveArtifact ( emptyMavenProject , "dummy" , "dummy" , "1" , this . defaultRepositorySystemSession ) ; "<AssertPlaceHolder>" ; } resolveArtifact ( org . apache . maven . project . MavenProject , java . lang . String , java . lang . String , java . lang . String , org . eclipse . aether . RepositorySystemSession ) { try { org . eclipse . aether . artifact . Artifact tileArtifact = getArtifactFromCoordinates ( groupId , artifactId , version ) ; org . eclipse . aether . resolution . ArtifactRequest request = getArtifactRequestFromArtifact ( tileArtifact , currentProject ) ; org . eclipse . aether . resolution . ArtifactResult result = this . repositorySystem . resolveArtifact ( repositorySystemSession , request ) ; return result . getArtifact ( ) . getFile ( ) ; } catch ( org . eclipse . aether . resolution . ArtifactResolutionException e ) { throw new org . apache . maven . plugin . MojoExecutionException ( java . lang . String . format ( "Error<sp>resolving<sp>artifact<sp>%s:%s:%s" , groupId , artifactId , version ) ) ; } }
org . junit . Assert . assertNotNull ( artifactFile )
test ( ) { System . err . println ( "" ) ; java . lang . String inputStr = "Ceritifcate" ; byte [ ] data = inputStr . getBytes ( ) ; byte [ ] encrypt = com . qmx . framework . nio . CertificateCoder . encryptByPublicKey ( data , certificatePath ) ; System . out . println ( new java . lang . String ( encrypt ) ) ; byte [ ] decrypt = com . qmx . framework . nio . CertificateCoder . decryptByPrivateKey ( encrypt , keyStorePath , alias , password ) ; java . lang . String outputStr = new java . lang . String ( decrypt ) ; System . err . println ( ( ( ( ( ":<sp>" + inputStr ) + "\n\r" ) + ":<sp>" ) + outputStr ) ) ; "<AssertPlaceHolder>" ; } verifyCertificate ( java . lang . String ) { return com . qmx . framework . nio . CertificateCoder . verifyCertificate ( new java . util . Date ( ) , certificatePath ) ; }
org . junit . Assert . assertTrue ( com . qmx . framework . nio . CertificateCoder . verifyCertificate ( certificatePath ) )
error1 ( ) { final java . util . List < javax . websocket . Extension > extensions = org . glassfish . tyrus . core . TyrusExtension . fromHeaders ( java . util . Arrays . asList ( "ext1;param=val\"ue" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , extensions . size ( ) )
testAppendNullStringBundler ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( ) ; sb . append ( ( ( com . liferay . petra . string . StringBundler ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } index ( ) { for ( Map . Entry < java . lang . String , java . util . Set < java . lang . Long > > primaryKeysEntry : _primaryKeys . entrySet ( ) ) { java . lang . String className = primaryKeysEntry . getKey ( ) ; com . liferay . portal . kernel . search . Indexer < ? > indexer = indexerRegistry . getIndexer ( className ) ; if ( indexer == null ) { if ( com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . isWarnEnabled ( ) ) { com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . warn ( ( "No<sp>indexer<sp>for<sp>" + className ) ) ; } continue ; } if ( com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . isDebugEnabled ( ) ) { com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . debug ( ( "Indexing<sp>" + className ) ) ; } for ( long primaryKey : primaryKeysEntry . getValue ( ) ) { try { indexer . reindex ( className , primaryKey ) ; } catch ( com . liferay . portal . kernel . search . SearchException se ) { if ( com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . isWarnEnabled ( ) ) { com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . warn ( com . liferay . petra . string . StringBundler . concat ( "Unable<sp>to<sp>index<sp>entry<sp>for<sp>class<sp>name<sp>" , className , "<sp>and<sp>primary<sp>key<sp>" , primaryKey ) , se ) ; } } } } if ( _ddmStructureKeys . isEmpty ( ) ) { return ; } java . util . Set < java . lang . Long > primaryKeys = _primaryKeys . get ( com . liferay . journal . model . JournalArticle . class . getName ( ) ) ; com . liferay . portal . kernel . search . Indexer < ? > indexer = indexerRegistry . getIndexer ( com . liferay . journal . model . JournalArticle . class . getName ( ) ) ; for ( java . lang . String ddmStructureKey : _ddmStructureKeys ) { java . util . List < com . liferay . journal . model . JournalArticle > journalArticles = journalArticleLocalService . getArticlesByStructureId ( getGroupId ( ) , ddmStructureKey , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; for ( com . liferay . journal . model . JournalArticle journalArticle : journalArticles ) { if ( ( primaryKeys != null ) && ( primaryKeys . contains ( journalArticle . getPrimaryKey ( ) ) ) ) { continue ; } try { indexer . reindex ( com . liferay . journal . model . JournalArticle . class . getName ( ) , journalArticle . getPrimaryKey ( ) ) ; } catch ( com . liferay . portal . kernel . search . SearchException se ) { if ( com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . isWarnEnabled ( ) ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 4 ) ; sb . append ( "Cannot<sp>index<sp>entry:<sp>className=" ) ; sb . append ( com . liferay . journal . model . JournalArticle . class . getName ( ) ) ; sb . append ( ",<sp>primaryKey=" ) ; sb . append ( journalArticle . getPrimaryKey ( ) ) ; com . liferay . exportimport . resources . importer . internal . util . FileSystemImporter . _log . warn ( sb . toString ( ) , se ) ; } } } } }
org . junit . Assert . assertEquals ( 0 , sb . index ( ) )
should_apply_transform ( ) { for ( int i = 1 ; i < 4 ; i ++ ) { java . util . List < java . lang . Integer > list = com . google . common . primitives . Ints . asList ( 0 , 1 , 2 , 3 ) ; java . util . function . Function < java . lang . Integer , java . lang . Integer > f = ( n ) -> n + 1 ; au . edu . wehi . idsv . util . ParallelTransformIterator < java . lang . Integer , java . lang . Integer > it = new au . edu . wehi . idsv . util . ParallelTransformIterator < java . lang . Integer , java . lang . Integer > ( list . iterator ( ) , f , i , Runnable :: run ) ; java . util . List < java . lang . Integer > results = com . google . common . collect . Lists . newArrayList ( it ) ; "<AssertPlaceHolder>" ; } } iterator ( ) { return au . edu . wehi . idsv . SAMEvidenceSource . mergedIterator ( all , true ) ; }
org . junit . Assert . assertEquals ( results , com . google . common . primitives . Ints . asList ( 1 , 2 , 3 , 4 ) )
calling ( ) { org . sqlite . Function . create ( conn , "f1" , new org . sqlite . Function ( ) { @ org . sqlite . Override public void xFunc ( ) throws java . sql . SQLException { org . sqlite . UDFTest . val = 4 ; } } ) ; stat . executeQuery ( "select<sp>f1();" ) . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { stat . close ( ) ; conn . close ( ) ; }
org . junit . Assert . assertEquals ( org . sqlite . UDFTest . val , 4 )
testAsInt4 ( ) { org . apache . tajo . datum . Datum d = org . apache . tajo . datum . DatumFactory . createFloat8 ( 5.0 ) ; "<AssertPlaceHolder>" ; } asInt4 ( ) { throw new org . apache . tajo . datum . exception . InvalidCastException ( ( ( type ) + "<sp>cannot<sp>be<sp>casted<sp>to<sp>INT<sp>type" ) ) ; }
org . junit . Assert . assertEquals ( 5 , d . asInt4 ( ) )
testDiagPart ( ) { org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 16 , 16 , DataType . DOUBLE ) . reshape ( 4 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray expOut = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1 , 6 , 11 , 16 } ) . castTo ( DataType . DOUBLE ) ; org . nd4j . autodiff . samediff . SDVariable in = sd . var ( "in" , input ) ; org . nd4j . autodiff . samediff . SDVariable t = sd . math ( ) . diagPart ( "dp" , in ) ; org . nd4j . autodiff . samediff . SDVariable loss = sd . standardDeviation ( "loss" , t , true , 0 ) ; java . lang . String err = org . nd4j . autodiff . validation . OpValidation . validate ( new org . nd4j . autodiff . validation . TestCase ( sd ) . expectedOutput ( "dp" , expOut ) . gradientCheck ( true ) ) ; "<AssertPlaceHolder>" ; } gradientCheck ( boolean ) { this . setGradientCheck ( isGradientCheck ) ; return this ; }
org . junit . Assert . assertNull ( err )
tree_iter_2_05 ( ) { int [ ] keys = new int [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; org . apache . jena . dboe . index . RangeIndex rIndex = makeRangeIndex ( 2 ) ; org . apache . jena . dboe . index . test . IndexTestLib . add ( rIndex , keys ) ; java . util . List < java . lang . Integer > x = toIntList ( rIndex . iterator ( null , r ( 4 ) ) ) ; java . util . List < java . lang . Integer > expected = toIntList ( 0 , 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; } r ( int ) { return org . apache . jena . tdb . base . record . RecordLib . intToRecord ( v , org . apache . jena . tdb . base . record . RecordLib . TestRecordLength ) ; }
org . junit . Assert . assertEquals ( expected , x )
squareBracesParserShouldNotReplaceUnknownTokens ( ) { org . mule . runtime . core . privileged . util . TemplateParser tp = org . mule . runtime . core . privileged . util . TemplateParser . createSquareBracesStyleParser ( ) ; java . util . Map < java . lang . String , java . lang . String > map = java . util . Collections . emptyMap ( ) ; java . lang . String template = "smtp://[toAddress]" ; java . lang . String result = tp . parse ( map , template ) ; "<AssertPlaceHolder>" ; } parse ( org . mule . runtime . core . privileged . util . TemplateParser$TemplateCallback , java . util . Map ) { if ( templates == null ) { return new java . util . HashMap ( ) ; } java . util . Map < java . lang . Object , java . lang . String > map = new java . util . HashMap ( templates . size ( ) ) ; for ( java . util . Map . Entry < ? , ? > entry : templates . entrySet ( ) ) { map . put ( entry . getKey ( ) , parse ( callback , entry . getValue ( ) . toString ( ) ) ) ; } return map ; }
org . junit . Assert . assertEquals ( "smtp://[toAddress]" , result )
NotificationEndPointGetReturnsExpectedUri ( ) { java . lang . String expectedUri = java . lang . String . format ( "NotificationEndPoints('%s')" , java . net . URLEncoder . encode ( com . microsoft . windowsazure . services . media . models . NotificationEndPointEntityTest . sampleNotificationEndPointId , "UTF-8" ) ) ; com . microsoft . windowsazure . services . media . entityoperations . EntityGetOperation < com . microsoft . windowsazure . services . media . models . NotificationEndPointInfo > getter = com . microsoft . windowsazure . services . media . models . NotificationEndPoint . get ( com . microsoft . windowsazure . services . media . models . NotificationEndPointEntityTest . sampleNotificationEndPointId ) ; "<AssertPlaceHolder>" ; } getUri ( ) { return uri ; }
org . junit . Assert . assertEquals ( expectedUri , getter . getUri ( ) )
testSame ( ) { javax . vecmath . Point3d foo = new javax . vecmath . Point3d ( 1.0 , 2.0 , 4.5 ) ; javax . vecmath . Point3d bar = new javax . vecmath . Point3d ( 1.0 , 2.0 , 4.5 ) ; org . openscience . cdk . tools . diff . tree . IDifference result = org . openscience . cdk . tools . diff . tree . Point3dDifference . construct ( "Foo" , foo , bar ) ; "<AssertPlaceHolder>" ; } construct ( java . lang . String , javax . vecmath . Point3d , javax . vecmath . Point3d ) { if ( ( first == null ) && ( second == null ) ) return null ; org . openscience . cdk . tools . diff . tree . Point3dDifference totalDiff = new org . openscience . cdk . tools . diff . tree . Point3dDifference ( name ) ; totalDiff . addChild ( org . openscience . cdk . tools . diff . tree . DoubleDifference . construct ( "x" , ( first == null ? null : first . x ) , ( second == null ? null : second . x ) ) ) ; totalDiff . addChild ( org . openscience . cdk . tools . diff . tree . DoubleDifference . construct ( "y" , ( first == null ? null : first . y ) , ( second == null ? null : second . y ) ) ) ; totalDiff . addChild ( org . openscience . cdk . tools . diff . tree . DoubleDifference . construct ( "z" , ( first == null ? null : first . z ) , ( second == null ? null : second . z ) ) ) ; if ( ( totalDiff . childCount ( ) ) == 0 ) { return null ; } return totalDiff ; }
org . junit . Assert . assertNull ( result )
testSimpleLimit3 ( ) { java . util . List < com . orientechnologies . orient . core . record . impl . ODocument > qResult = com . orientechnologies . orient . graph . sql . OMatchStatementExecutionTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "match<sp>{class:Person,<sp>as:<sp>person,<sp>where:<sp>(name<sp>=<sp>'n1'<sp>or<sp>name<sp>=<sp>'n2')}<sp>return<sp>person<sp>limit<sp>3" ) ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( 2 , qResult . size ( ) )
constructor_matching_example ( ) { uk . co . benjiweber . expressions . caseclass . CaseConstructorTest . Person so = uk . co . benjiweber . expressions . caseclass . CaseConstructorTest . Person . person ( "Some" , "One" ) ; java . lang . String someone = so . match ( ) . when ( uk . co . benjiweber . expressions . caseclass . CaseConstructorTest . Person . person ( "Ann" , "Other" ) , ( p ) -> "another" ) . when ( uk . co . benjiweber . expressions . caseclass . CaseConstructorTest . Person . person ( "Some" , "One" ) , ( p ) -> "someone" ) . _ ( "Unknown<sp>Person" ) ; "<AssertPlaceHolder>" ; } when ( java . util . function . BiFunction , A , B ) { return new uk . co . benjiweber . expressions . caseclass . Case . ZeroMatchConstructorBuilder < T > ( ) { public < R > uk . co . benjiweber . expressions . caseclass . Case . MatchBuilderR < T , R > then ( java . util . function . Function < T , R > f ) { T original = constructor . apply ( a , b ) ; return new uk . co . benjiweber . expressions . caseclass . Case . MatchBuilderR < T , R > ( asList ( uk . co . benjiweber . expressions . caseclass . Case . MatchDefinition . create ( original , f ) ) , uk . co . benjiweber . expressions . caseclass . Case . this ) ; } } ; }
org . junit . Assert . assertEquals ( "someone" , someone )
testAccessServiceJBossXMLWithRightsNoConf ( ) { net . maritimecloud . identityregistry . model . database . entities . Service service = new net . maritimecloud . identityregistry . model . database . entities . Service ( ) ; service . setMrn ( "urn:mrn:mcl:service:instance:dma:nw-nm" ) ; service . setName ( "ROLE_SERVICE_ADMIN" 3 ) ; service . setInstanceVersion ( "0.3.4" ) ; service . setIdOrganization ( 1L ) ; service . setOidcAccessType ( null ) ; java . lang . String serviceJson = serialize ( service ) ; net . maritimecloud . identityregistry . model . database . Organization org = spy ( net . maritimecloud . identityregistry . model . database . Organization . class ) ; org . setMrn ( "urn:mrn:mcl:org:dma" ) ; org . setAddress ( "Carl<sp>Jakobsensvej<sp>31,<sp>2500<sp>Valby" ) ; org . setCountry ( "Denmark" ) ; org . setUrl ( "http://dma.dk" ) ; org . setEmail ( "dma@dma.dk" ) ; org . setName ( "ROLE_SERVICE_ADMIN" 0 ) ; java . util . Set < net . maritimecloud . identityregistry . model . database . IdentityProviderAttribute > identityProviderAttributes = new java . util . HashSet ( ) ; org . setIdentityProviderAttributes ( identityProviderAttributes ) ; org . keycloak . adapters . springsecurity . token . KeycloakAuthenticationToken auth = net . maritimecloud . identityregistry . controllers . TokenGenerator . generateKeycloakToken ( "urn:mrn:mcl:org:dma" , "ROLE_SERVICE_ADMIN" , "ROLE_SERVICE_ADMIN" 1 ) ; given ( this . organizationService . getOrganizationByMrn ( "urn:mrn:mcl:org:dma" ) ) . willReturn ( org ) ; given ( ( ( net . maritimecloud . identityregistry . services . ServiceService ) ( this . entityService ) ) . getServiceByMrnAndVersion ( "urn:mrn:mcl:service:instance:dma:nw-nm" , "0.3.4" ) ) . willReturn ( service ) ; when ( org . getId ( ) ) . thenReturn ( 1L ) ; try { mvc . perform ( get ( "/oidc/api/org/urn:mrn:mcl:org:dma/service/urn:mrn:mcl:service:instance:dma:nw-nm/0.3.4/jbossxml" ) . with ( authentication ( auth ) ) . header ( "ROLE_SERVICE_ADMIN" 2 , "bla" ) ) . andExpect ( status ( ) . isNotFound ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( false )
testFirstWithOneAttributeOp ( ) { org . stringtemplate . v4 . org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . org . stringtemplate . v4 . ST ( "<first(names)>" ) ; e . add ( "names" , "Ter" ) ; java . lang . String expecting = "Ter" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , e . render ( ) )
testSetTreeNumber ( ) { System . out . println ( "setTreeNumber" ) ; int value = 1 ; instance = new edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFTreeViewBuilder ( ) ; encoder = new edu . oswego . csc480_hci521_2013 . server . ServerUrlEncoder ( ) ; java . lang . String expResult = "http://localhost:54321null?tree_number=1" ; java . lang . String result = instance . setTreeNumber ( value ) . build ( encoder ) ; "<AssertPlaceHolder>" ; } build ( edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . UrlEncoder ) { java . lang . StringBuilder query = new java . lang . StringBuilder ( ) ; for ( java . lang . String key : args . keySet ( ) ) { for ( java . lang . String value : args . get ( key ) ) { if ( ( query . length ( ) ) == 0 ) { query . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } else { query . append ( '&' ) . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } } } java . lang . String url = ( ( ( ( ( ( ( protocol ) + "://" ) + ( host ) ) + ":" ) + ( port ) ) + ( page ) ) + ( ( query . length ( ) ) > 0 ? "?" : "" ) ) + ( query . toString ( ) ) ; return url ; }
org . junit . Assert . assertEquals ( expResult , result )
getTestCase_toString ( ) { com . hazelcast . simulator . coordinator . TestSuite testSuite = new com . hazelcast . simulator . coordinator . TestSuite ( "class=Foo" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "PerformanceStats{" + "operationCount=" ) + ( operationCount ) ) + ",<sp>intervalThroughput=" ) + ( intervalThroughput ) ) + ",<sp>totalThroughput=" ) + ( totalThroughput ) ) + ",<sp>intervalAvgLatencyNanos=" ) + ( intervalLatencyAvgNanos ) ) + ",<sp>intervalLatency999PercentileNanos=" ) + ( intervalLatency999PercentileNanos ) ) + ",<sp>intervalMaxLatencyNanos=" ) + ( intervalLatencyMaxNanos ) ) + '}' ; }
org . junit . Assert . assertNotNull ( testSuite . toString ( ) )
whenCharsAfter ( ) { final java . lang . String x = org . apache . isis . viewer . restfulobjects . server . ResourceContext . stripQuotes ( "\"123\"<sp>" ) ; "<AssertPlaceHolder>" ; } is ( org . apache . isis . core . metamodel . spec . feature . Contributed ) { return new com . google . common . base . Predicate < T > ( ) { @ org . apache . isis . core . metamodel . specloader . specimpl . Override public boolean apply ( org . apache . isis . core . metamodel . spec . feature . ObjectMember input ) { return contributed . isIncluded ( ) ; } } ; }
org . junit . Assert . assertThat ( x , org . hamcrest . Matchers . is ( "\"123\"<sp>" ) )
testSerial ( ) { for ( dap4 . test . TestSerial . ClientTest testcase : chosentests ) { if ( ! ( doOneTest ( testcase ) ) ) { "<AssertPlaceHolder>" ; } } } doOneTest ( dap4 . test . TestCDMClient$TestCase ) { System . err . println ( ( "Testcase:<sp>" + ( testcase . getURL ( ) ) ) ) ; System . err . println ( ( "Baseline:<sp>" + ( testcase . getBaseline ( ) ) ) ) ; ucar . nc2 . dataset . NetcdfDataset ncfile ; try { ncfile = openDataset ( testcase . getURL ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; throw new java . lang . Exception ( ( "File<sp>open<sp>failed:<sp>" + ( testcase . getURL ( ) ) ) , e ) ; } assert ncfile != null ; java . lang . String datasetname = testcase . getDataset ( ) ; java . lang . String data = dumpdata ( ncfile , datasetname ) ; if ( prop_visual ) { visual ( ( ( testcase . getTitle ( ) ) + ".dap" ) , data ) ; } java . lang . String baselinefile = testcase . getBaseline ( ) ; if ( prop_baseline ) writefile ( baselinefile , data ) ; else if ( prop_diff ) { java . lang . String baselinecontent = readfile ( baselinefile ) ; System . err . println ( ( "Comparison:<sp>vs<sp>" + baselinefile ) ) ; org . junit . Assert . assertTrue ( "***<sp>FAIL" , same ( getTitle ( ) , baselinecontent , data ) ) ; } }
org . junit . Assert . assertTrue ( false )
assertExecuteForSinglePreparedStatementSuccessWithDML ( ) { java . sql . PreparedStatement preparedStatement = getPreparedStatement ( ) ; when ( preparedStatement . execute ( ) ) . thenReturn ( false ) ; setExecuteGroups ( java . util . Collections . singletonList ( preparedStatement ) , SQLType . DML ) ; "<AssertPlaceHolder>" ; verify ( preparedStatement ) . execute ( ) ; } execute ( ) { return execute ( new org . apache . shardingsphere . shardingjdbc . executor . StatementExecutor . Executor ( ) { @ org . apache . shardingsphere . shardingjdbc . executor . Override public boolean execute ( final java . sql . Statement statement , final java . lang . String sql ) throws java . sql . SQLException { return statement . execute ( sql ) ; } } ) ; }
org . junit . Assert . assertFalse ( actual . execute ( ) )
validate_shouldPassValidationIfAllRequiredFieldsHaveProperValues ( ) { org . openmrs . Role role = new org . openmrs . Role ( ) ; role . setRole ( "Bowling<sp>race<sp>car<sp>driver" ) ; role . setDescription ( "You<sp>don't<sp>bowl<sp>or<sp>race<sp>fast<sp>cars" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( role , "type" ) ; new org . openmrs . validator . RoleValidator ( ) . validate ( role , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertFalse ( errors . hasErrors ( ) )
testPreInsert_Lion ( ) { com . jmethods . catatumbo . entities . Lion lion = new com . jmethods . catatumbo . entities . Lion ( ) ; lion = com . jmethods . catatumbo . ListenerInheritanceTest . em . insert ( lion ) ; java . lang . String preInsertClassName = com . jmethods . catatumbo . PreInsert . class . getSimpleName ( ) ; java . lang . String expected = ( ( ( ( ( ( com . jmethods . catatumbo . entities . WildAnimal . class . getSimpleName ( ) ) + "." ) + preInsertClassName ) + "->" ) + ( com . jmethods . catatumbo . entities . Lion . class . getSimpleName ( ) ) ) + "." ) + preInsertClassName ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( expected , lion . getValue ( ) )
saveAndRetrieveBasicResource ( ) { java . lang . String input = org . apache . commons . io . IOUtils . toString ( getClass ( ) . getResourceAsStream ( "/basic-stu3.xml" ) , StandardCharsets . UTF_8 ) ; java . lang . String respString = ourClient . transaction ( ) . withBundle ( input ) . prettyPrint ( ) . execute ( ) ; ca . uhn . fhir . jpa . provider . dstu3 . ResourceProviderDstu3Test . ourLog . info ( respString ) ; org . hl7 . fhir . dstu3 . model . Bundle bundle = myFhirCtx . newXmlParser ( ) . parseResource ( org . hl7 . fhir . dstu3 . model . Bundle . class , respString ) ; ca . uhn . fhir . jpa . provider . dstu3 . IdType id = new ca . uhn . fhir . jpa . provider . dstu3 . IdType ( bundle . getEntry ( ) . get ( 0 ) . getResponse ( ) . getLocation ( ) ) ; ca . uhn . fhir . jpa . provider . dstu3 . Basic basic = ourClient . read ( ) . resource ( ca . uhn . fhir . jpa . provider . dstu3 . Basic . class ) . withId ( id ) . execute ( ) ; ca . uhn . fhir . jpa . provider . dstu3 . List < ca . uhn . fhir . jpa . provider . dstu3 . Extension > exts = basic . getExtensionsByUrl ( "http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/DateID" ) ; "<AssertPlaceHolder>" ; } size ( ) { return myTagSet . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , exts . size ( ) )
testResolveExceptionCode_exception_isNull ( ) { java . util . LinkedHashMap < java . lang . String , java . lang . String > exceptionMappings = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; exceptionMappings . put ( "SystemException" , "sys001" ) ; testTarget . setExceptionMappings ( exceptionMappings ) ; testTarget . setDefaultExceptionCode ( "default001" ) ; java . lang . String actualExceptionCode = testTarget . resolveExceptionCode ( null ) ; "<AssertPlaceHolder>" ; } resolveExceptionCode ( java . lang . Exception ) { if ( ex == null ) { org . terasoluna . gfw . common . exception . SimpleMappingExceptionCodeResolver . logger . warn ( "target<sp>exception<sp>is<sp>null.<sp>return<sp>defaultExceptionCode." ) ; return defaultExceptionCode ; } if ( ex instanceof org . terasoluna . gfw . common . exception . ExceptionCodeProvider ) { java . lang . String code = ( ( org . terasoluna . gfw . common . exception . ExceptionCodeProvider ) ( ex ) ) . getCode ( ) ; if ( code != null ) { return code ; } } if ( ( ( exceptionMappings ) == null ) || ( exceptionMappings . isEmpty ( ) ) ) { return defaultExceptionCode ; } for ( java . util . Map . Entry < java . lang . String , java . lang . String > entry : exceptionMappings . entrySet ( ) ) { java . lang . String targetException = entry . getKey ( ) ; java . lang . Class < ? > exceptionClass = ex . getClass ( ) ; while ( exceptionClass != ( java . lang . Object . class ) ) { if ( exceptionClass . getName ( ) . contains ( targetException ) ) { return entry . getValue ( ) ; } exceptionClass = exceptionClass . getSuperclass ( ) ; } } return defaultExceptionCode ; }
org . junit . Assert . assertThat ( actualExceptionCode , org . hamcrest . CoreMatchers . is ( "default001" ) )
dumpDifference_uri ( ) { java . io . File target = new java . io . File ( "target/testing/dump/difference-uri.html" ) ; target . delete ( ) ; com . asakusafw . testdriver . JobFlowTester tester = new com . asakusafw . testdriver . JobFlowTester ( getClass ( ) ) ; tester . setFrameworkHomePath ( framework . getHome ( ) ) ; tester . input ( "simple" , com . asakusafw . testdriver . testing . model . Simple . class ) . prepare ( "data/simple-in.json" ) ; tester . output ( "simple" , com . asakusafw . testdriver . testing . model . Simple . class ) . verify ( "data/difference-out.json" , new com . asakusafw . testdriver . IdentityVerifier ( ) ) . dumpDifference ( target . toURI ( ) . toString ( ) ) ; try { tester . runTest ( com . asakusafw . testdriver . testing . dsl . SimpleJobflow . class ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . AssertionError e ) { } "<AssertPlaceHolder>" ; } exists ( ) { return new org . hamcrest . BaseMatcher < java . io . File > ( ) { @ com . asakusafw . operation . tools . directio . Override public boolean matches ( java . lang . Object item ) { return ( ( java . io . File ) ( item ) ) . exists ( ) ; } @ com . asakusafw . operation . tools . directio . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( "exists" ) ; } } ; }
org . junit . Assert . assertThat ( target . exists ( ) , is ( true ) )
requestIsremovedFromTheQeueAfterItcrashes ( ) { try { org . openqa . grid . web . servlet . handler . SeleniumBasedRequest newSession = org . openqa . grid . internal . mock . GridHelper . createNewSessionRequest ( org . openqa . grid . internal . NewRequestCrashesDuringNewSessionTest . registry , SeleniumProtocol . WebDriver , org . openqa . grid . internal . NewRequestCrashesDuringNewSessionTest . ff ) ; org . openqa . grid . internal . mock . MockedRequestHandler newSessionRequest = new org . openqa . grid . internal . NewRequestCrashesDuringNewSessionTest . MockedBuggyNewSessionRequestHandler ( newSession , null , org . openqa . grid . internal . NewRequestCrashesDuringNewSessionTest . registry ) ; newSessionRequest . process ( ) ; } catch ( java . lang . RuntimeException e ) { System . out . println ( e . getMessage ( ) ) ; } "<AssertPlaceHolder>" ; } getNewSessionRequestCount ( ) { return newSessionQueue . getNewSessionRequestCount ( ) ; }
org . junit . Assert . assertEquals ( 0 , org . openqa . grid . internal . NewRequestCrashesDuringNewSessionTest . registry . getNewSessionRequestCount ( ) )
testJoinArrayEmpty ( ) { System . out . println ( "join" ) ; java . lang . String [ ] words = new java . lang . String [ ] { } ; java . lang . String character = "," ; java . lang . String expResult = "" ; java . lang . String result = retrieval . utils . CollectionUtils . join ( words , character ) ; "<AssertPlaceHolder>" ; } join ( java . util . Collection , java . lang . String ) { if ( words . isEmpty ( ) ) { return "" ; } java . lang . StringBuilder wordList = new java . lang . StringBuilder ( ) ; for ( java . lang . String word : words ) { wordList . append ( word ) . append ( character ) ; } java . lang . String s = new java . lang . String ( wordList . deleteCharAt ( ( ( wordList . length ( ) ) - ( character . length ( ) ) ) ) ) ; return s ; }
org . junit . Assert . assertEquals ( expResult , result )
LOGBACK_1101 ( ) { java . lang . String input = "a:<sp>{y}" ; ch . qos . logback . core . subst . Node node = makeNode ( input ) ; ch . qos . logback . core . subst . NodeToStringTransformer nodeToStringTransformer = new ch . qos . logback . core . subst . NodeToStringTransformer ( node , propertyContainer0 ) ; "<AssertPlaceHolder>" ; } transform ( ) { java . lang . StringBuilder stringBuilder = new java . lang . StringBuilder ( ) ; compileNode ( node , stringBuilder , new java . util . Stack < ch . qos . logback . core . subst . Node > ( ) ) ; return stringBuilder . toString ( ) ; }
org . junit . Assert . assertEquals ( "a:<sp>{y}" , nodeToStringTransformer . transform ( ) )
testGetAssetCategoryIdsNotContainsAllCategories ( ) { long assetCategoryId1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long assetCategoryId2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule assetQueryRule = new com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule ( false , true , "assetCategories" , new java . lang . String [ ] { java . lang . String . valueOf ( assetCategoryId1 ) , java . lang . String . valueOf ( assetCategoryId2 ) } ) ; java . util . List < com . liferay . asset . publisher . util . test . AssetPublisherUtilTest . AssetQueryRule > assetQueryRules = new java . util . ArrayList ( ) ; assetQueryRules . add ( assetQueryRule ) ; javax . portlet . PortletPreferences portletPreferences = getAssetPublisherPortletPreferences ( assetQueryRules ) ; long [ ] assetCategoryIds = _assetPublisherHelper . getAssetCategoryIds ( portletPreferences ) ; "<AssertPlaceHolder>" ; } toString ( net . fortuna . ical4j . model . Calendar ) { net . fortuna . ical4j . data . CalendarOutputter calendarOutputter = new net . fortuna . ical4j . data . CalendarOutputter ( ) ; net . fortuna . ical4j . model . ComponentList componentList = iCalCalendar . getComponents ( ) ; if ( componentList . isEmpty ( ) ) { calendarOutputter . setValidating ( false ) ; } com . liferay . portal . kernel . io . unsync . UnsyncStringWriter unsyncStringWriter = new com . liferay . portal . kernel . io . unsync . UnsyncStringWriter ( ) ; calendarOutputter . output ( iCalCalendar , unsyncStringWriter ) ; unsyncStringWriter . flush ( ) ; return unsyncStringWriter . toString ( ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . toString ( assetCategoryIds ) , 0 , assetCategoryIds . length )
indexingFixed ( ) { final java . util . SortedSet < com . yandex . yoctodb . util . UnsignedByteArray > elements = new java . util . TreeSet ( ) ; final int size = 3 ; for ( int i = 0 ; i < size ; i ++ ) elements . add ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( i ) ) ; final com . yandex . yoctodb . util . mutable . ByteArraySortedSet set = new com . yandex . yoctodb . util . mutable . impl . VariableLengthByteArraySortedSet ( elements ) ; for ( int i = 0 ; i < size ; i ++ ) "<AssertPlaceHolder>" ; } indexOf ( com . yandex . yoctodb . util . common . BufferIterator ) { assert ( keysCount ) > 0 ; long movingOffset = 0L ; while ( true ) { final int metadata = java . lang . Byte . toUnsignedInt ( nodes . get ( movingOffset ) ) ; movingOffset += Byte . BYTES ; if ( hasPrefix ( metadata ) ) { final int prefixSize = nodes . getInt ( movingOffset ) ; movingOffset += Integer . BYTES ; final com . yandex . yoctodb . util . common . BufferIterator prefix = new com . yandex . yoctodb . util . common . BufferIterator ( nodes , movingOffset , prefixSize ) ; if ( ( key . compareToPrefix ( prefix ) ) != 0 ) { return com . yandex . yoctodb . util . immutable . impl . TrieByteArraySortedSet . NOT_FOUND ; } movingOffset += prefixSize * ( Byte . BYTES ) ; } int maybeValue = com . yandex . yoctodb . util . immutable . impl . TrieByteArraySortedSet . NOT_FOUND ; if ( hasValue ( metadata ) ) { maybeValue = nodes . getInt ( movingOffset ) ; movingOffset += Integer . BYTES ; } if ( ! ( key . hasNext ( ) ) ) { return maybeValue ; } final int next = key . next ( ) ; switch ( edgeType ( metadata ) ) { case EDGES_SINGLE : { if ( next != ( java . lang . Byte . toUnsignedInt ( nodes . get ( ( movingOffset ++ ) ) ) ) ) { return com . yandex . yoctodb . util . immutable . impl . TrieByteArraySortedSet . NOT_FOUND ; } movingOffset = nodes . getLong ( movingOffset ) ; break ; } case EDGES_BITSET : { int min = java . lang . Byte . toUnsignedInt ( nodes . get ( ( movingOffset ++ ) ) ) ; int max = java . lang . Byte . toUnsignedInt ( nodes . get ( ( movingOffset ++ ) ) ) ; if ( ( ( min > next ) || ( max < next ) ) || ( ! ( com . yandex . yoctodb . util . immutable . impl . BufferBitSet . get ( nodes , movingOffset , ( next - min ) ) ) ) ) { return com . yandex . yoctodb . util . immutable . impl . TrieByteArraySortedSet . NOT_FOUND ; } int index = com . yandex . yoctodb . util . immutable . impl . BufferBitSet . cardinalityTo ( nodes , movingOffset , ( next - min ) ) ; movingOffset += ( com . yandex . yoctodb . util . immutable . impl . BufferBitSet . arraySize ( ( ( max - min ) + 1 ) ) ) * ( Long . BYTES ) ; movingOffset = nodes . getLong ( ( movingOffset + ( index * ( Long . BYTES ) ) ) ) ; break ; } case EDGES_CONDENSED : { int min = java . lang . Byte . toUnsignedInt ( nodes . get ( ( movingOffset ++ ) ) ) ; int max = java . lang . Byte . toUnsignedInt ( nodes . get ( ( movingOffset ++ ) ) ) ; if ( ( min > next ) || ( max < next ) ) { return com . yandex . yoctodb . util . immutable . impl . TrieByteArraySortedSet . NOT_FOUND ; } int index = next - min ; movingOffset = nodes . getLong ( ( movingOffset + ( index * ( Long . BYTES ) ) ) ) ; break ; } default : return com . yandex . yoctodb . util . immutable . impl . TrieByteArraySortedSet . NOT_FOUND ; } } }
org . junit . Assert . assertEquals ( i , set . indexOf ( com . yandex . yoctodb . util . UnsignedByteArrays . from ( i ) ) )
multiple_value_comparison_returns_true_when_field_value_matches_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{<sp>'$and'<sp>:<sp>[<sp>{'field':'field4','op':'>','rvalue':3.5},{'field':'field6.nf1','op':'>','rvalue':'nvalue0'}]<sp>}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertTrue ( ctx . getResult ( ) )
testRepeatsIndex ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz . create ( "(A<sp>B<sp>(A<sp>C<sp>B)<sp>B<sp>D<sp>D)" ) ) ) ; java . util . Map < java . lang . Integer , java . util . List < java . lang . Object > > m = wiz . index ( t ) ; java . lang . String found = sortMapToString ( m ) ; java . lang . String expecting = "{5=[A,<sp>A],<sp>6=[B,<sp>B,<sp>B],<sp>7=[C],<sp>8=[D,<sp>D]}" ; "<AssertPlaceHolder>" ; } sortMapToString ( org . antlr . test . Map ) { System . out . println ( ( "Map<sp>toString<sp>looks<sp>like:<sp>" + ( m . toString ( ) ) ) ) ; if ( m == null ) { return null ; } org . antlr . test . TreeMap < K , V > nset = new org . antlr . test . TreeMap < K , V > ( m ) ; System . out . println ( ( "Tree<sp>map<sp>looks<sp>like:<sp>" + ( nset . toString ( ) ) ) ) ; return nset . toString ( ) ; }
org . junit . Assert . assertEquals ( expecting , found )
testHasConfigurePermission ( ) { hudson . plugins . jobConfigHistory . JobConfigHistoryBaseAction sut = new hudson . plugins . jobConfigHistory . JobConfigHistoryBaseActionTest . JobConfigHistoryBaseActionImpl ( ) ; boolean expResult = false ; boolean result = sut . hasConfigurePermission ( ) ; "<AssertPlaceHolder>" ; } hasConfigurePermission ( ) { return getAccessControlledObject ( ) . hasPermission ( Item . CONFIGURE ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testCreateMultipleProjectsAtOnceWithSameName ( ) { com . vmware . admiral . auth . project . ProjectService . ProjectState state = new com . vmware . admiral . auth . project . ProjectService . ProjectState ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { state . name = "test-name" ; createProjectNoWait ( state ) ; } java . lang . Thread . sleep ( 1000 ) ; java . util . List < com . vmware . admiral . auth . project . ProjectService . ProjectState > projects = new java . util . ArrayList ( ) ; com . vmware . xenon . common . test . TestContext ctx = testCreate ( 1 ) ; host . send ( com . vmware . xenon . common . Operation . createGet ( host , com . vmware . xenon . common . UriUtils . buildExpandLinksQueryUri ( com . vmware . xenon . common . UriUtils . buildUri ( ProjectFactoryService . SELF_LINK ) ) . toString ( ) ) . setCompletion ( ( o , ex ) -> { if ( ex != null ) { ctx . failIteration ( ex ) ; return ; } com . vmware . xenon . common . ServiceDocumentQueryResult result = o . getBody ( . class ) ; projects . addAll ( result . documents . values ( ) . stream ( ) . map ( ( p ) -> ( ( com . vmware . admiral . auth . project . ProjectService . ProjectState ) ( p ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ) ; ctx . completeIteration ( ) ; } ) ) ; ctx . await ( ) ; java . util . List < com . vmware . admiral . auth . project . ProjectService . ProjectState > testProjects = projects . stream ( ) . filter ( ( p ) -> p . name . equalsIgnoreCase ( "test-name" ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } filter ( java . util . Collection ) { java . lang . Throwable [ ] error = new java . lang . Throwable [ ] { null } ; final java . util . Map < java . lang . String , com . vmware . admiral . request . allocation . filter . HostSelectionFilter . HostSelection > hostSelectionMap = prepareHostSelectionMap ( ) ; host . testStart ( 1 ) ; filter . filter ( state , hostSelectionMap , ( filteredHostSelectionMap , e ) -> { if ( e != null ) { error [ 0 ] = e ; } else if ( ( expectedLinks . size ( ) ) == ( filteredHostSelectionMap . size ( ) ) ) { HashSet < java . lang . String > expectedLinksSet = new com . vmware . admiral . request . allocation . filter . HashSet < > ( expectedLinks ) ; expectedLinksSet . removeAll ( filteredHostSelectionMap . keySet ( ) ) ; if ( ! ( expectedLinksSet . isEmpty ( ) ) ) { error [ 0 ] = new java . lang . IllegalStateException ( ( ( ( "Filtered<sp>hostLinks:<sp>" + ( filteredHostSelectionMap . keySet ( ) . toString ( ) ) ) + "<sp>-<sp>Expected<sp>hostlinks:<sp>" ) + ( expectedLinks . toString ( ) ) ) ) ; } } else { error [ 0 ] = new java . lang . IllegalStateException ( ( ( ( "Filtered<sp>hostLinks<sp>size<sp>is:<sp>" + ( filteredHostSelectionMap . size ( ) ) ) + "<sp>-<sp>Expected<sp>size<sp>is:<sp>" ) + ( expectedLinks . size ( ) ) ) ) ; } com . vmware . admiral . request . allocation . filter . host . completeIteration ( ) ; } ) ; host . testWait ( ) ; if ( ( ( throwErrorOnFilter ) && ( ( error [ 0 ] ) != null ) ) && ( ! ( expectedLinks . isEmpty ( ) ) ) ) { throw error [ 0 ] ; } return error [ 0 ] ; }
org . junit . Assert . assertEquals ( 1 , testProjects . size ( ) )
testX ( ) { org . teiid . query . sql . symbol . Expression ex = org . teiid . query . processor . TestFunctionResolving . getExpression ( "ST_X(ST_GeomFromText('POINT(1<sp>2)'))" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . teiid . query . eval . Criteria ) { return new org . teiid . query . eval . Evaluator ( java . util . Collections . emptyMap ( ) , null , null ) . evaluate ( criteria , java . util . Collections . emptyList ( ) ) ; }
org . junit . Assert . assertEquals ( 1.0 , org . teiid . query . eval . Evaluator . evaluate ( ex ) )
findsPersonByUsername_inSearchApi ( ) { io . qala . datagen . examples . Person person = new io . qala . datagen . examples . Person ( english ( 1 , 50 ) ) ; rest . save ( person ) ; "<AssertPlaceHolder>" ; } search ( java . lang . String ) { return bool ( ) ? rest . searchByUsername ( username ) : rest . searchByUsername ( new io . qala . datagen . examples . RestService . SearchRequest ( username ) ) ; }
org . junit . Assert . assertEquals ( person , search ( person . username ( ) ) )
uniqueTokensAreGenerated ( ) { com . clouway . oauth2 . token . UrlSafeTokenGenerator tokenGenerator = new com . clouway . oauth2 . token . UrlSafeTokenGenerator ( ) ; java . util . Set < java . lang . String > tokens = com . google . common . collect . Sets . newHashSet ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { tokens . add ( tokenGenerator . generate ( ) ) ; } "<AssertPlaceHolder>" ; } generate ( ) { java . lang . String generatedToken = com . google . common . io . BaseEncoding . base64Url ( ) . encode ( java . util . UUID . randomUUID ( ) . toString ( ) . getBytes ( ) ) ; return trimRight ( generatedToken , '=' ) ; }
org . junit . Assert . assertThat ( tokens . size ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( 10 ) ) )
testWindowDecorSimpleWMPos ( ) { final com . jogamp . opengl . test . junit . newt . Capabilities caps = new com . jogamp . opengl . test . junit . newt . Capabilities ( ) ; "<AssertPlaceHolder>" ; final com . jogamp . opengl . test . junit . newt . Window window = com . jogamp . opengl . test . junit . newt . TestWindows01NEWT . createWindow ( caps , ( - 1 ) , ( - 1 ) , com . jogamp . opengl . test . junit . newt . TestWindows01NEWT . width , com . jogamp . opengl . test . junit . newt . TestWindows01NEWT . height , true , false ) ; com . jogamp . opengl . test . junit . newt . TestWindows01NEWT . destroyWindow ( window , true ) ; }
org . junit . Assert . assertNotNull ( caps )
equals_null ( ) { final net . sf . qualitycheck . immutableobject . domain . Type a = new net . sf . qualitycheck . immutableobject . domain . Type ( java . lang . String . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final net . sf . qualitycheck . ConditionalCheckTest . NotEqual other = ( ( net . sf . qualitycheck . ConditionalCheckTest . NotEqual ) ( obj ) ) ; if ( ( value ) != ( other . value ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( a . equals ( null ) )
testContains ( ) { org . spout . api . inventory . ItemStack item = getRandomItem ( ) ; int slot = getRandomSlot ( ) ; inventory . set ( slot , item ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o instanceof org . spout . api . material . Material ) { return contains ( ( ( org . spout . api . material . Material ) ( o ) ) ) ; } else if ( o instanceof org . spout . api . inventory . ItemStack ) { return contains ( ( ( org . spout . api . inventory . ItemStack ) ( o ) ) ) ; } return false ; }
org . junit . Assert . assertTrue ( inventory . contains ( item ) )
runTest ( ) { boolean result = checkNoError ( "Social_Communities_Get_Members" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )