input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testLiteral ( ) { java . lang . String noSubst = "hello<sp>world" ; java . lang . String result = ch . qos . logback . core . util . OptionHelper . substVars ( noSubst , context ) ; "<AssertPlaceHolder>" ; } substVars ( java . lang . String , ch . qos . logback . core . spi . PropertyContainer ) { return ch . qos . logback . core . util . OptionHelper . substVars ( val , pc1 , null ) ; }
org . junit . Assert . assertEquals ( noSubst , result )
existingUserCodeExceptionsNotWrapped ( ) { org . apache . beam . sdk . util . UserCodeException existing = org . apache . beam . sdk . util . UserCodeException . wrap ( new java . io . IOException ( ) ) ; org . apache . beam . sdk . util . UserCodeException wrapped = org . apache . beam . sdk . util . UserCodeException . wrap ( existing ) ; "<AssertPlaceHolder>" ; } wrap ( java . lang . Throwable ) { throw org . apache . beam . sdk . util . UserCodeException . wrap ( t ) ; }
org . junit . Assert . assertEquals ( existing , wrapped )
implementGuestNetwork ( ) { if ( ( _context . containsKey ( "enable_console_output" ) ) && ( _context . get ( "enable_console_output" ) . equals ( "true" ) ) ) { System . out . println ( "untagged" 0 ) ; System . out . println ( "---------------------------------------------------" ) ; } _resource . configure ( "PaloAltoResource" , _resourceParams ) ; com . cloud . agent . api . to . IpAddressTO ip = new com . cloud . agent . api . to . IpAddressTO ( java . lang . Long . valueOf ( "1" ) , "192.168.80.102" , true , false , true , "untagged" , null , null , null , 100 , false ) ; com . cloud . agent . api . to . IpAddressTO [ ] ips = new com . cloud . agent . api . to . IpAddressTO [ 1 ] ; ips [ 0 ] = ip ; com . cloud . agent . api . routing . IpAssocCommand cmd = new com . cloud . agent . api . routing . IpAssocCommand ( ips ) ; cmd . setAccessDetail ( NetworkElementCommand . GUEST_NETWORK_GATEWAY , "10.3.96.1" ) ; cmd . setAccessDetail ( NetworkElementCommand . GUEST_NETWORK_CIDR , "10.3.96.1/20" ) ; cmd . setAccessDetail ( NetworkElementCommand . GUEST_VLAN_TAG , "3954" ) ; com . cloud . agent . api . routing . IpAssocAnswer answer = ( ( com . cloud . agent . api . routing . IpAssocAnswer ) ( _resource . executeRequest ( cmd ) ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return this . result ; }
org . junit . Assert . assertTrue ( answer . getResult ( ) )
testGeneratedIdSequenceNotSupported ( ) { com . j256 . ormlite . table . TableInfo < com . j256 . ormlite . db . GeneratedIdSequence , java . lang . Integer > tableInfo = new com . j256 . ormlite . table . TableInfo < com . j256 . ormlite . db . GeneratedIdSequence , java . lang . Integer > ( databaseType , com . j256 . ormlite . db . GeneratedIdSequence . class ) ; "<AssertPlaceHolder>" ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; java . util . ArrayList < java . lang . String > additionalArgs = new java . util . ArrayList < java . lang . String > ( ) ; java . util . ArrayList < java . lang . String > statementsBefore = new java . util . ArrayList < java . lang . String > ( ) ; databaseType . appendColumnArg ( null , sb , tableInfo . getFieldTypes ( ) [ 0 ] , additionalArgs , statementsBefore , null , null ) ; }
org . junit . Assert . assertEquals ( 2 , tableInfo . getFieldTypes ( ) . length )
testSerialization ( ) { org . jfree . data . xy . DefaultHighLowDataset d1 = new org . jfree . data . xy . DefaultHighLowDataset ( "Series<sp>1" , new java . util . Date [ ] { new java . util . Date ( 123L ) } , new double [ ] { 1.2 } , new double [ ] { 3.4 } , new double [ ] { 5.6 } , new double [ ] { 7.8 } , new double [ ] { 99.9 } ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( d1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . data . xy . DefaultHighLowDataset d2 = ( ( org . jfree . data . xy . DefaultHighLowDataset ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( d1 , d2 )
getOriginalPrintStreamReturnsOriginalPrintStream ( ) { perContextPrintStream = new uk . org . lidalia . sysoutslf4j . system . PerContextPrintStream ( System . err ) ; "<AssertPlaceHolder>" ; } getOriginalPrintStream ( ) { final java . io . PrintStream result ; final java . util . concurrent . locks . Lock readLock = systemOutput . getLock ( ) . readLock ( ) ; readLock . lock ( ) ; try { if ( isPerContextPrintStream ( ) ) { result = getPerContextPrintStream ( ) . getOriginalPrintStream ( ) ; } else { result = systemOutput . get ( ) ; } return result ; } finally { readLock . unlock ( ) ; } }
org . junit . Assert . assertSame ( System . err , perContextPrintStream . getOriginalPrintStream ( ) )
testSetPassword ( ) { org . apache . cayenne . tools . DbGeneratorTask task = new org . apache . cayenne . tools . DbGeneratorTask ( ) ; task . setPassword ( "xyz" ) ; "<AssertPlaceHolder>" ; } setPassword ( java . lang . String ) { this . password = password ; }
org . junit . Assert . assertEquals ( "xyz" , task . password )
testReadPeerReviewSchemaValidate ( ) { org . orcid . jaxb . test . utils . OrcidTranslator < org . orcid . jaxb . model . v3 . rc2 . record . PeerReview > t = org . orcid . jaxb . test . utils . OrcidTranslator . forSchema ( SchemaVersion . V3_0RC2_PEER_REVIEW ) ; java . io . Reader reader = new java . io . InputStreamReader ( getClass ( ) . getResourceAsStream ( "/record_3.0_rc1/samples/read_samples/peer-review-3.0_rc1.xml" ) ) ; org . orcid . jaxb . model . v3 . rc2 . record . PeerReview p = t . readXmlRecord ( reader ) ; "<AssertPlaceHolder>" ; } readXmlRecord ( java . io . Reader ) { return ( ( T ) ( unmarshaller . unmarshal ( reader ) ) ) ; }
org . junit . Assert . assertNotNull ( p )
confirmIfUnitExists_NullId ( ) { org . oscm . ui . dialog . mp . userGroups . ManageGroupCtrl mgc = new org . oscm . ui . dialog . mp . userGroups . ManageGroupCtrl ( ) { @ org . oscm . ui . dialog . mp . userGroups . Override public java . lang . String getSelectedGroupId ( ) { return null ; } } ; mgc . setManageGroupModel ( model ) ; java . lang . String result = mgc . confirmIfUnitExists ( ) ; "<AssertPlaceHolder>" ; } confirmIfUnitExists ( ) { manageGroupModel . setSelectedGroupId ( getSelectedGroupId ( ) ) ; if ( ! ( org . oscm . string . Strings . isEmpty ( manageGroupModel . getSelectedGroupId ( ) ) ) ) { try { getUserGroupService ( ) . getUserGroupDetailsForList ( java . lang . Long . valueOf ( manageGroupModel . getSelectedGroupId ( ) ) . longValue ( ) ) ; return org . oscm . ui . beans . BaseBean . OUTCOME_EDIT_GROUP ; } catch ( org . oscm . internal . types . exception . ObjectNotFoundException e ) { manageGroupModel . setSelectedGroupId ( null ) ; return org . oscm . ui . beans . BaseBean . OUTCOME_REFRESH ; } } else { manageGroupModel . setSelectedGroupId ( null ) ; return org . oscm . ui . beans . BaseBean . OUTCOME_REFRESH ; } }
org . junit . Assert . assertEquals ( BaseBean . OUTCOME_REFRESH , result )
isOwnerWithGuestOwnerForOtherUsers ( ) { org . phenotips . data . Patient p = mock ( org . phenotips . data . Patient . class ) ; org . phenotips . data . permissions . internal . EntityAccessHelper h = mock ( org . phenotips . data . permissions . internal . EntityAccessHelper . class ) ; org . phenotips . data . permissions . internal . EntityAccessManager am = mock ( org . phenotips . data . permissions . internal . EntityAccessManager . class ) ; org . phenotips . data . permissions . internal . EntityVisibilityManager vm = mock ( org . phenotips . data . permissions . internal . EntityVisibilityManager . class ) ; when ( am . getOwner ( p ) ) . thenReturn ( org . phenotips . data . permissions . internal . DefaultPatientAccessTest . GUEST_OWNER_OBJECT ) ; when ( h . getCurrentUser ( ) ) . thenReturn ( org . phenotips . data . permissions . internal . DefaultPatientAccessTest . OTHER_USER ) ; org . phenotips . data . permissions . PatientAccess pa = new org . phenotips . data . permissions . internal . DefaultPatientAccess ( p , h , am , vm ) ; "<AssertPlaceHolder>" ; } isOwner ( ) { org . phenotips . data . Patient p = mock ( org . phenotips . data . Patient . class ) ; org . phenotips . data . permissions . internal . EntityAccessHelper h = mock ( org . phenotips . data . permissions . internal . EntityAccessHelper . class ) ; org . phenotips . data . permissions . internal . EntityAccessManager am = mock ( org . phenotips . data . permissions . internal . EntityAccessManager . class ) ; org . phenotips . data . permissions . internal . EntityVisibilityManager vm = mock ( org . phenotips . data . permissions . internal . EntityVisibilityManager . class ) ; when ( am . getOwner ( p ) ) . thenReturn ( org . phenotips . data . permissions . internal . DefaultPatientAccessTest . OWNER_OBJECT ) ; when ( h . getCurrentUser ( ) ) . thenReturn ( org . phenotips . data . permissions . internal . DefaultPatientAccessTest . OWNER ) ; org . phenotips . data . permissions . PatientAccess pa = new org . phenotips . data . permissions . internal . DefaultPatientAccess ( p , h , am , vm ) ; org . junit . Assert . assertTrue ( pa . isOwner ( ) ) ; when ( h . getCurrentUser ( ) ) . thenReturn ( org . phenotips . data . permissions . internal . DefaultPatientAccessTest . OTHER_USER ) ; org . junit . Assert . assertFalse ( pa . isOwner ( ) ) ; }
org . junit . Assert . assertFalse ( pa . isOwner ( ) )
testExtractURIprefix1 ( ) { java . lang . String extractedPrefix = org . sbolstandard . core2 . URIcompliance . extractURIprefix ( uri8 ) ; "<AssertPlaceHolder>" ; } extractURIprefix ( java . net . URI ) { java . lang . String URIstr = objURI . toString ( ) ; java . util . regex . Matcher m = org . sbolstandard . core2 . URIcompliance . genericURIpattern1bPat . matcher ( URIstr ) ; if ( m . matches ( ) ) return m . group ( 2 ) ; else return null ; }
org . junit . Assert . assertNull ( extractedPrefix )
nullBulkReply ( ) { java . io . InputStream is = new java . io . ByteArrayInputStream ( "$-1\r\n" . getBytes ( ) ) ; java . lang . String response = ( ( java . lang . String ) ( redis . clients . jedis . Protocol . read ( new redis . clients . jedis . util . RedisInputStream ( is ) ) ) ) ; "<AssertPlaceHolder>" ; } read ( redis . clients . jedis . util . RedisInputStream ) { return redis . clients . jedis . Protocol . process ( is ) ; }
org . junit . Assert . assertNull ( response )
testHead ( ) { javax . ws . rs . client . Invocation . Builder request = org . jboss . resteasy . test . rx . RxCompletionStageServerAsyncTest . client . target ( org . jboss . resteasy . test . rx . RxCompletionStageServerAsyncTest . generateURL ( "/head/string" ) ) . request ( ) ; javax . ws . rs . core . Response response = request . head ( ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
shouldOccupiedHypercubesReturnZeroIfThereAreNotOccupiedHypercubes ( ) { org . uma . jmetal . util . AdaptiveGrid < org . uma . jmetal . solution . DoubleSolution > adaptiveGrid ; int bisections = 5 ; int objectives = 2 ; adaptiveGrid = new org . uma . jmetal . util . AdaptiveGrid ( bisections , objectives ) ; int [ ] hypercubes = new int [ ( ( int ) ( java . lang . Math . pow ( 2.0 , ( bisections * objectives ) ) ) ) ] ; for ( int i : hypercubes ) { hypercubes [ i ] = 0 ; } org . springframework . test . util . ReflectionTestUtils . setField ( adaptiveGrid , "hypercubes" , hypercubes ) ; adaptiveGrid . calculateOccupied ( ) ; "<AssertPlaceHolder>" ; } occupiedHypercubes ( ) { return occupied . length ; }
org . junit . Assert . assertEquals ( 0 , adaptiveGrid . occupiedHypercubes ( ) )
testLogout ( ) { ctx . logout ( ) ; "<AssertPlaceHolder>" ; } getSubject ( ) { return subject ; }
org . junit . Assert . assertSame ( subject , ctx . getSubject ( ) )
validate_requiredFieldsAreSet_returnTrue ( ) { request . setConnectorId ( 42 ) ; request . setIdTag ( "xxx" ) ; request . setMeterStart ( 42 ) ; request . setTimestamp ( java . util . Calendar . getInstance ( ) ) ; boolean isValid = request . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; }
org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) )
shouldGetEmptyPropertiesFromTimestampWhenNoTimestampPropertyInGroup ( ) { final uk . gov . gchq . gaffer . store . schema . Schema schema = new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( ) . json ( uk . gov . gchq . gaffer . commonutil . StreamUtil . schemas ( getClass ( ) ) ) . build ( ) ; serialisation = new uk . gov . gchq . gaffer . hbasestore . serialisation . ElementSerialisation ( new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( schema ) . config ( HBaseStoreConstants . TIMESTAMP_PROPERTY , TestPropertyNames . TIMESTAMP ) . build ( ) ) ; final long timestamp = java . lang . System . currentTimeMillis ( ) ; final java . lang . String group = uk . gov . gchq . gaffer . commonutil . TestGroups . EDGE ; final uk . gov . gchq . gaffer . data . element . Properties properties = serialisation . getPropertiesFromTimestamp ( group , timestamp ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , properties . size ( ) )
testOrFails ( ) { buildRule . executeTarget ( "orfails" ) ; "<AssertPlaceHolder>" ; } getProject ( ) { return project ; }
org . junit . Assert . assertNull ( buildRule . getProject ( ) . getProperty ( "orfails" ) )
parseApiVersion_empty ( ) { javax . xml . soap . SOAPPart part = mock ( javax . xml . soap . SOAPPart . class ) ; javax . xml . soap . SOAPEnvelope envelope = mock ( javax . xml . soap . SOAPEnvelope . class ) ; doReturn ( envelope ) . when ( part ) . getEnvelope ( ) ; doReturn ( part ) . when ( message ) . getSOAPPart ( ) ; java . lang . String result = org . oscm . apiversioning . soapmgmt . parser . SoapRequestParser . parseApiVersion ( context ) ; "<AssertPlaceHolder>" ; } parseApiVersion ( javax . xml . ws . handler . soap . SOAPMessageContext ) { javax . xml . soap . SOAPMessage soapMessage = context . getMessage ( ) ; javax . xml . soap . SOAPEnvelope soapEnvelope = soapMessage . getSOAPPart ( ) . getEnvelope ( ) ; javax . xml . soap . SOAPHeader soapHeader = soapEnvelope . getHeader ( ) ; if ( soapHeader == null ) { return "" ; } java . util . Iterator < ? > it = null ; java . util . Iterator < ? > itCm = soapHeader . extractHeaderElements ( org . oscm . apiversioning . soapmgmt . parser . SoapRequestParser . VERSION_CM ) ; if ( ( itCm == null ) || ( ! ( itCm . hasNext ( ) ) ) ) { java . util . Iterator < ? > itCtmg = soapHeader . extractHeaderElements ( org . oscm . apiversioning . soapmgmt . parser . SoapRequestParser . VERSION_CTMG ) ; if ( ( itCtmg == null ) || ( ! ( itCtmg . hasNext ( ) ) ) ) { return "" ; } else { it = itCtmg ; } } else { it = itCm ; } javax . xml . soap . Node node = ( ( javax . xml . soap . Node ) ( it . next ( ) ) ) ; java . lang . String value = ( node == null ) ? null : node . getValue ( ) ; return value ; }
org . junit . Assert . assertEquals ( "" , result )
testVechToVecLeft ( ) { double [ ] [ ] n = new double [ ] [ ] { new double [ ] { 6.0 , 8.0 , 6.0 , 8.0 } , new double [ ] { 8.0 , 9.0 , 7.0 , 9.0 } , new double [ ] { 6.0 , 7.0 , 12.0 , 16.0 } , new double [ ] { 8.0 , 9.0 , 16.0 , 18.0 } } ; double [ ] [ ] n1 = edu . cmu . tetrad . util . MatrixUtils . vec ( n ) ; double [ ] [ ] n2 = edu . cmu . tetrad . util . MatrixUtils . vech ( n ) ; double [ ] [ ] n3 = edu . cmu . tetrad . util . MatrixUtils . vechToVecLeft ( 4 ) ; double [ ] [ ] n4 = edu . cmu . tetrad . util . MatrixUtils . product ( n3 , n2 ) ; "<AssertPlaceHolder>" ; } equals ( double [ ] [ ] , double [ ] [ ] ) { if ( ( ma . length ) != ( mb . length ) ) { return false ; } for ( int i = 0 ; i < ( ma . length ) ; i ++ ) { double [ ] _ma = ma [ i ] ; double [ ] _mb = mb [ i ] ; if ( ! ( java . util . Arrays . equals ( _ma , _mb ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( edu . cmu . tetrad . util . MatrixUtils . equals ( n4 , n1 ) )
testGetLastTaskTime_2 ( ) { org . audit4j . core . util . StopWatch fixture = new org . audit4j . core . util . StopWatch ( "" ) ; fixture . setKeepTaskList ( true ) ; fixture . start ( "" ) ; halt ( ) ; fixture . stop ( ) ; long result = fixture . getLastTaskTime ( ) ; "<AssertPlaceHolder>" ; } getLastTaskTime ( ) { if ( ( this . lastTaskInfo ) == null ) { throw new java . lang . IllegalStateException ( "No<sp>tasks<sp>run:<sp>can't<sp>get<sp>last<sp>task<sp>interval" ) ; } return this . lastTaskInfo . getTime ( ) ; }
org . junit . Assert . assertNotNull ( result )
testAddAdapterUsesDoesNotUseCachingBehaviorByDefault ( ) { com . picocontainer . DefaultPicoContainer pico = new com . picocontainer . DefaultPicoContainer ( new com . picocontainer . behaviors . OptInCaching ( ) . wrap ( new com . picocontainer . injectors . ConstructorInjection ( ) ) ) ; pico . addAdapter ( new com . picocontainer . adapters . InstanceAdapter ( "foo" , "bar" , new com . picocontainer . lifecycle . NullLifecycleStrategy ( ) , new com . picocontainer . monitors . NullComponentMonitor ( ) ) ) ; com . picocontainer . ComponentAdapter foo = pico . getComponentAdapter ( "foo" ) ; "<AssertPlaceHolder>" ; } getComponentAdapter ( java . lang . Object ) { checkReadPermission ( ) ; return pico . getComponentAdapter ( key ) ; }
org . junit . Assert . assertEquals ( com . picocontainer . adapters . InstanceAdapter . class , foo . getClass ( ) )
getNewDefinitionsExistingNotDeclared ( ) { final org . obeonetwork . m2doc . genconf . Generation generation = GenconfPackage . eINSTANCE . getGenconfFactory ( ) . createGeneration ( ) ; final org . obeonetwork . m2doc . genconf . StringDefinition stringDefinition = GenconfPackage . eINSTANCE . getGenconfFactory ( ) . createStringDefinition ( ) ; stringDefinition . setKey ( "variable" ) ; generation . getDefinitions ( ) . add ( stringDefinition ) ; try ( org . apache . poi . xwpf . usermodel . XWPFDocument document = new org . apache . poi . xwpf . usermodel . XWPFDocument ( ) ) { final org . obeonetwork . m2doc . properties . TemplateCustomProperties properties = new org . obeonetwork . m2doc . properties . TemplateCustomProperties ( document ) ; final java . util . List < org . obeonetwork . m2doc . genconf . Definition > definitions = org . obeonetwork . m2doc . genconf . GenconfUtils . getNewDefinitions ( generation , properties ) ; "<AssertPlaceHolder>" ; } } getNewDefinitions ( org . obeonetwork . m2doc . genconf . Generation , org . obeonetwork . m2doc . properties . TemplateCustomProperties ) { final org . eclipse . acceleo . query . runtime . IQueryEnvironment queryEnvironment = org . eclipse . acceleo . query . runtime . Query . newEnvironment ( ) ; queryEnvironment . registerEPackage ( EcorePackage . eINSTANCE ) ; queryEnvironment . registerCustomClassMapping ( EcorePackage . eINSTANCE . getEStringToStringMapEntry ( ) , org . eclipse . emf . ecore . impl . EStringToStringMapEntryImpl . class ) ; templateCustomProperties . configureQueryEnvironmentWithResult ( queryEnvironment ) ; final org . eclipse . acceleo . query . parser . AstValidator validator = new org . eclipse . acceleo . query . parser . AstValidator ( new org . eclipse . acceleo . query . runtime . impl . ValidationServices ( queryEnvironment ) ) ; final java . util . Map < java . lang . String , java . util . Set < org . eclipse . acceleo . query . validation . type . IType > > variablesTypes = templateCustomProperties . getVariableTypes ( validator , queryEnvironment ) ; final java . util . Set < java . lang . String > existingVariables = new java . util . HashSet < java . lang . String > ( ) ; for ( org . obeonetwork . m2doc . genconf . Definition definition : generation . getDefinitions ( ) ) { if ( ( variablesTypes . containsKey ( definition . getKey ( ) ) ) && ( org . obeonetwork . m2doc . genconf . GenconfUtils . isValidDefinitionForType ( queryEnvironment , definition , variablesTypes . get ( definition . getKey ( ) ) ) ) ) { existingVariables . add ( definition . getKey ( ) ) ; } } final java . util . List < org . obeonetwork . m2doc . genconf . Definition > newDefinitions = new java . util . ArrayList < org . obeonetwork . m2doc . genconf . Definition > ( ) ; for ( java . util . Map . Entry < java . lang . String , java . util . Set < org . eclipse . acceleo . query . validation . type . IType > > entry : variablesTypes . entrySet ( ) ) { if ( ! ( existingVariables . contains ( entry . getKey ( ) ) ) ) { final org . obeonetwork . m2doc . genconf . Definition newDefinition = org . obeonetwork . m2doc . genconf . GenconfUtils . createDefinition ( queryEnvironment , entry . getKey ( ) , entry . getValue ( ) ) ; if ( newDefinition != null ) { newDefinitions . add ( newDefinition ) ; } } } return newDefinitions ; }
org . junit . Assert . assertEquals ( 0 , definitions . size ( ) )
test_withCurrencyScale_int_same ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . withCurrencyScale ( ) ; "<AssertPlaceHolder>" ; } withCurrencyScale ( ) { return withScale ( currency . getDecimalPlaces ( ) , RoundingMode . UNNECESSARY ) ; }
org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test )
testIsEmpty_NoPayload ( ) { pubMessage = new net . xenqtt . message . PubMessage ( net . xenqtt . message . QoS . AT_LEAST_ONCE , false , "my<sp>topic" , 123 , new byte [ 0 ] ) ; message = new net . xenqtt . client . PublishMessage ( channelManager , channel , pubMessage ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( pubMessage . getPayload ( ) . length ) == 0 ; }
org . junit . Assert . assertTrue ( message . isEmpty ( ) )
testGetCacheKeyNullValue ( ) { org . apache . druid . query . filter . InDimFilter inDimFilter = org . apache . druid . query . filter . InDimFilterSerDesrTest . mapper . readValue ( "{\"type\":\"in\",\"dimension\":\"dimTest\",\"values\":[null]}" , org . apache . druid . query . filter . InDimFilter . class ) ; "<AssertPlaceHolder>" ; } getCacheKey ( ) { final org . apache . druid . query . cache . CacheKeyBuilder builder = new org . apache . druid . query . cache . CacheKeyBuilder ( org . apache . druid . query . aggregation . post . PostAggregatorIds . MOMENTS_SKETCH_TO_MAX_CACHE_TYPE_ID ) . appendCacheable ( field ) ; return builder . build ( ) ; }
org . junit . Assert . assertNotNull ( inDimFilter . getCacheKey ( ) )
testStopWithoutStart ( ) { final org . apache . druid . query . lookup . KafkaLookupExtractorFactory factory = new org . apache . druid . query . lookup . KafkaLookupExtractorFactory ( cacheManager , org . apache . druid . query . lookup . KafkaLookupExtractorFactoryTest . TOPIC , org . apache . druid . query . lookup . KafkaLookupExtractorFactoryTest . DEFAULT_PROPERTIES ) ; "<AssertPlaceHolder>" ; } close ( ) { jsonGenerator . close ( ) ; }
org . junit . Assert . assertTrue ( factory . close ( ) )
testResizeDeleteData ( ) { net . openhft . lang . io . DirectByteBufferBytes buffer = new net . openhft . lang . io . DirectByteBufferBytes ( 16 ) ; for ( int i = 1 ; ( buffer . position ( ) ) < ( buffer . capacity ( ) ) ; i ++ ) { buffer . writeInt ( i ) ; } buffer . resize ( 32 , true , false ) . position ( 0L ) ; for ( int i = 1 ; i <= 8 ; i ++ ) { "<AssertPlaceHolder>" ; } } readInt ( ) { int i = getChronicleUnsafe ( ) . getInt ( position ) ; addPosition ( 4 ) ; return i ; }
org . junit . Assert . assertEquals ( 0 , buffer . readInt ( ) )
asIntsInsertPositionInOriginalListIsRespected ( ) { org . tessell . tests . model . properties . ListProperty < java . lang . Integer > ints = p . as ( new org . tessell . tests . model . properties . ListPropertyTest . StringToElementConverter ( ) ) ; p . set ( joist . util . Copy . list ( "3" ) ) ; p . add ( 0 , "2" ) ; "<AssertPlaceHolder>" ; } get ( ) { return org . tessell . widgets . StubGWTBridge . getScheduler ( ) ; }
org . junit . Assert . assertThat ( ints . get ( ) , org . hamcrest . Matchers . contains ( 2 , 3 ) )
testWithFixedVocabulary ( ) { final java . lang . String [ ] _words = new java . lang . String [ ] { "foo" , "bar" , "baz" , "test" , "alpha" , "beta" , "phi" , "rho" } ; final java . util . List < java . lang . String > words = new java . util . ArrayList < java . lang . String > ( ) ; for ( final java . lang . String word : _words ) words . add ( word ) ; final int numOfDocs = _words . length ; for ( int i = 0 ; i < ( _words . length ) ; i ++ ) { putSync ( com . pearson . entech . elasticsearch . search . facet . approx . termlist . TermListFacetTest . newID ( ) , _words [ i ] , _words [ i ] , 0 , 0 ) ; } final java . util . Set < java . lang . String > uniqs = new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( _words ) ) ; "<AssertPlaceHolder>" ; final org . elasticsearch . action . search . SearchResponse response1 = getTermList ( "src/test/resources/TermListFacetTest.json" ) ; checkStringSearchResponse ( response1 , numOfDocs , uniqs . size ( ) , words ) ; } countAll ( ) { return client ( ) . prepareCount ( "_all" ) . execute ( ) . actionGet ( ) . getCount ( ) ; }
org . junit . Assert . assertEquals ( numOfDocs , countAll ( ) )
testReplaceWithSimpleField_subject_field ( ) { try { search = new org . odftoolkit . simple . common . navigation . TextNavigation ( "ReplaceDateTarget" , doc ) ; org . odftoolkit . odfdom . dom . OdfContentDom contentDom = doc . getContentDom ( ) ; org . w3c . dom . NodeList nodeList = contentDom . getElementsByTagName ( TextSubjectElement . ELEMENT_NAME . getQName ( ) ) ; int i = nodeList . getLength ( ) ; org . odftoolkit . odfdom . dom . OdfStylesDom styleDom = doc . getStylesDom ( ) ; nodeList = styleDom . getElementsByTagName ( TextSubjectElement . ELEMENT_NAME . getQName ( ) ) ; i += nodeList . getLength ( ) ; while ( search . hasNext ( ) ) { org . odftoolkit . simple . common . navigation . TextSelection item = ( ( org . odftoolkit . simple . common . navigation . TextSelection ) ( search . nextSelection ( ) ) ) ; org . odftoolkit . simple . common . navigation . FieldSelection fieldSelection = new org . odftoolkit . simple . common . navigation . FieldSelection ( item ) ; fieldSelection . replaceWithSimpleField ( Field . FieldType . SUBJECT_FIELD ) ; i ++ ; } nodeList = contentDom . getElementsByTagName ( TextSubjectElement . ELEMENT_NAME . getQName ( ) ) ; int j = nodeList . getLength ( ) ; nodeList = styleDom . getElementsByTagName ( TextSubjectElement . ELEMENT_NAME . getQName ( ) ) ; j += nodeList . getLength ( ) ; "<AssertPlaceHolder>" ; doc . save ( org . odftoolkit . simple . utils . ResourceUtilities . newTestOutputFile ( org . odftoolkit . simple . common . navigation . FieldSelectionTest . SAVE_FILE_REPLACE ) ) ; } catch ( java . lang . Exception e ) { java . util . logging . Logger . getLogger ( org . odftoolkit . simple . common . navigation . FieldSelectionTest . class . getName ( ) ) . log ( Level . SEVERE , e . getMessage ( ) , e ) ; org . junit . Assert . fail ( ( ( ( ( "Failed<sp>with<sp>" + ( e . getClass ( ) . getName ( ) ) ) + ":<sp>'" ) + ( e . getMessage ( ) ) ) + "'" ) ) ; } } getLength ( ) { return attributes . getLength ( ) ; }
org . junit . Assert . assertEquals ( j , i )
asakusafw_version_override ( ) { provider . withProject ( com . asakusafw . utils . gradle . PropertyConfigurator . of ( "asakusafw.version" , "TESTING" ) ) ; com . asakusafw . integration . AsakusaProject project = provider . newInstance ( "testing" ) ; "<AssertPlaceHolder>" ; } property ( com . asakusafw . directio . hive . serde . PropertyDescriptor ) { this . properties . add ( descriptor ) ; return this ; }
org . junit . Assert . assertThat ( project . property ( "asakusafw.version" ) , is ( "TESTING" ) )
should_find_by_like_non_string ( ) { createSimple ( "testFindAll1" , 1 ) ; createSimple ( "testFindAll2" , 2 ) ; com . ctp . cdi . query . test . domain . Simple example = new com . ctp . cdi . query . test . domain . Simple ( "test" ) ; example . setCounter ( 1 ) ; java . util . List < com . ctp . cdi . query . test . domain . Simple > find = dao . findByLike ( example , Simple_ . name , Simple_ . counter ) ; "<AssertPlaceHolder>" ; } setCounter ( java . lang . Integer ) { this . counter = counter ; }
org . junit . Assert . assertEquals ( 1 , find . size ( ) )
uuids ( ) { java . util . List < java . lang . String > uuids = org . lightcouch . tests . DBServerTest . dbClient . context ( ) . uuids ( 10 ) ; "<AssertPlaceHolder>" ; } uuids ( long ) { final java . lang . String uri = java . lang . String . format ( "%s_uuids?count=%d" , dbc . getBaseUri ( ) , count ) ; final com . google . gson . JsonObject json = dbc . findAny ( com . google . gson . JsonObject . class , uri ) ; return dbc . getGson ( ) . fromJson ( json . get ( "uuids" ) . toString ( ) , new com . google . gson . reflect . TypeToken < java . util . List < java . lang . String > > ( ) { } . getType ( ) ) ; }
org . junit . Assert . assertThat ( uuids . size ( ) , org . hamcrest . CoreMatchers . is ( 10 ) )
getNameTest ( ) { for ( Map . Entry < java . lang . reflect . Field , jdk . vm . ci . meta . ResolvedJavaField > e : fields . entrySet ( ) ) { java . lang . String expected = e . getKey ( ) . getName ( ) ; java . lang . String actual = e . getValue ( ) . getName ( ) ; "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( expected , actual )
testMultipleUnion03 ( ) { java . lang . String query = "Compute[@fqdns=\"slc4-0003.ebay.com\"]{*}." + ( ( "(<sp><VPool>parentCluster[@_oid=\"CLguf6sdle\"]<sp>" + "||<sp>activeManifestRef[@_oid=\"B-N-D-1.20111108154904.0-unknown\"]<sp>" ) + "||<sp>activeManifestCur[@_oid=\"Black-Pearl-1.20111103221326.0-unknown\"])" ) ; com . ebay . cloud . cms . query . service . IQueryResult result = queryService . query ( query , stratusContext ) ; "<AssertPlaceHolder>" ; } getEntities ( ) { return entities ; }
org . junit . Assert . assertEquals ( 1 , result . getEntities ( ) . size ( ) )
noNullElements_nullAtEndArrayWithName_fail ( ) { net . sf . qualitycheck . exception . IllegalNullElementsException actual = null ; try { net . sf . qualitycheck . Check . noNullElements ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , null } , "obj" ) ; } catch ( final net . sf . qualitycheck . exception . IllegalNullElementsException e ) { actual = e ; throw e ; } finally { final java . lang . String expected = "The<sp>passed<sp>argument<sp>'obj'<sp>must<sp>not<sp>contain<sp>elements<sp>that<sp>are<sp>null." ; if ( actual != null ) { "<AssertPlaceHolder>" ; } } } getMessage ( ) { final java . lang . String message = super . getMessage ( ) ; if ( ( session ) != null ) { final java . lang . String context = session . getContext ( ) ; if ( ! ( context . isEmpty ( ) ) ) { return ( message + "<sp>" ) + context ; } else { return message ; } } else { return message ; } }
org . junit . Assert . assertEquals ( expected , actual . getMessage ( ) )
failoverRetry ( ) { try ( java . sql . Connection connection = java . sql . DriverManager . getConnection ( ( ( ( ( ( ( ( ( ( "jdbc:mariadb:failover//" + ( ( hostname ) != null ? hostname : "localhost" ) ) + ":" ) + ( port ) ) + "/" ) + ( database ) ) + "?user=" ) + ( username ) ) + ( ( password ) != null ? "&password=" + ( password ) : "" ) ) + "&socketTimeout=1000" ) ) ) { try ( java . sql . Statement stmt = connection . createStatement ( ) ) { stmt . execute ( "SELECT<sp>SLEEP(10)" ) ; org . junit . Assert . fail ( ) ; } catch ( java . sql . SQLNonTransientConnectionException e ) { } "<AssertPlaceHolder>" ; } } isClosed ( ) { return closed ; }
org . junit . Assert . assertTrue ( connection . isClosed ( ) )
deleteBodyOfAnnotation ( ) { com . github . anno4j . model . Annotation annotation = anno4j . createObject ( com . github . anno4j . model . Annotation . class ) ; annotation . setCreated ( "2015-01-28T12:00:00Z" ) ; annotation . setGenerated ( "2015-01-28T12:00:00Z" ) ; com . github . anno4j . model . impl . DeletionTest . DeletionTestBody body = anno4j . createObject ( com . github . anno4j . model . impl . DeletionTest . DeletionTestBody . class ) ; body . setValue ( "TestValue" ) ; annotation . addBody ( body ) ; com . github . anno4j . model . Annotation result = ( ( com . github . anno4j . model . Annotation ) ( anno4j . createQueryService ( ) . execute ( ) . get ( 0 ) ) ) ; result . getBodies ( ) . iterator ( ) . next ( ) . delete ( ) ; com . github . anno4j . model . Annotation annotationWithoutBody = ( ( com . github . anno4j . model . Annotation ) ( anno4j . createQueryService ( ) . execute ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return getObjectIterator ( ) ; }
org . junit . Assert . assertEquals ( null , annotationWithoutBody . getBodies ( ) . iterator ( ) . next ( ) )
testWriteTo ( ) { final java . io . StringWriter sink = new java . io . StringWriter ( ) ; final java . io . PrintWriter writer = new java . io . PrintWriter ( sink ) ; final com . allanbank . mongodb . client . metrics . basic . BasicServerMetricsListener metrics = new com . allanbank . mongodb . client . metrics . basic . BasicServerMetricsListener ( ) ; metrics . writeTo ( writer ) ; "<AssertPlaceHolder>" ; metrics . close ( ) ; } toString ( ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < ( myVersion . length ) ; ++ i ) { if ( i != 0 ) { builder . append ( '.' ) ; } builder . append ( java . lang . String . valueOf ( myVersion [ i ] ) ) ; } if ( ! ( mySuffix . isEmpty ( ) ) ) { if ( ( myVersion . length ) > 0 ) { builder . append ( '-' ) ; } builder . append ( mySuffix ) ; } return builder . toString ( ) ; }
org . junit . Assert . assertThat ( sink . toString ( ) , org . hamcrest . Matchers . is ( "" ) )
insertSortTest ( ) { int [ ] input = new int [ ] { 3 , 31 , 43 , 78 , 8 , 11 , 20 , 29 , 65 , 15 } ; int [ ] output = new int [ ] { 3 , 8 , 11 , 15 , 20 , 29 , 31 , 43 , 65 , 78 } ; chapter3 . insertionsort . InsertionSort insert = new chapter3 . insertionsort . SeunghoInsertionSort ( ) ; int [ ] result = insert . sort ( input ) ; "<AssertPlaceHolder>" ; } sort ( int [ ] ) { for ( int i = 1 ; i < ( input . length ) ; i ++ ) { int loc = i - 1 ; int newItem = input [ i ] ; while ( ( loc >= 0 ) && ( newItem < ( input [ loc ] ) ) ) { input [ ( loc + 1 ) ] = input [ loc ] ; loc -- ; } input [ ( loc + 1 ) ] = newItem ; } return input ; }
org . junit . Assert . assertArrayEquals ( result , output )
lookForUnexistingService ( ) { when ( request . getPath ( ) ) . thenReturn ( "/unexisting" ) ; final org . sentilo . platform . server . handler . AbstractHandler result = locator . lookup ( request ) ; "<AssertPlaceHolder>" ; verify ( request , times ( 0 ) ) . setPathParts ( any ( java . lang . String . class ) , any ( java . lang . String . class ) ) ; } lookup ( org . sentilo . platform . server . request . SentiloRequest ) { final java . lang . String path = request . getPath ( ) ; org . sentilo . platform . server . handler . AbstractHandler handler = null ; final java . lang . String [ ] tokens = org . sentilo . platform . server . request . RequestUtils . splitPath ( path ) ; if ( ! ( org . sentilo . common . utils . SentiloUtils . arrayIsEmpty ( tokens ) ) ) { final java . util . Queue < java . lang . String > handlerPathCandidates = new java . util . ArrayDeque < java . lang . String > ( ) ; if ( ( tokens . length ) > 2 ) { handlerPathCandidates . add ( org . sentilo . platform . server . request . RequestUtils . buildPath ( tokens [ 1 ] , tokens [ 2 ] ) ) ; } handlerPathCandidates . add ( org . sentilo . platform . server . request . RequestUtils . buildPath ( tokens [ 1 ] ) ) ; while ( ! ( org . springframework . util . CollectionUtils . isEmpty ( handlerPathCandidates ) ) ) { final java . lang . String handlerPath = handlerPathCandidates . poll ( ) ; handler = handlers . get ( handlerPath ) ; if ( handler != null ) { final java . lang . String resourcePath = org . sentilo . platform . server . request . RequestUtils . extractResource ( path , handlerPath ) ; request . setPathParts ( handlerPath , resourcePath ) ; break ; } } } return handler ; }
org . junit . Assert . assertNull ( result )
importTrustCertificateStrings_throwCertificateEncodingExceptionWhileCalculateSha1 ( ) { when ( certificate . getEncoded ( ) ) . thenThrow ( new java . security . cert . CertificateEncodingException ( "Throwing<sp>exception<sp>for<sp>test" ) ) ; java . security . cert . Certificate certAdded = underTest . importTrustCertificate ( CERT_IN_PEM_UNIX , "test" ) ; "<AssertPlaceHolder>" ; verify ( keyStoreManager ) . importTrustCertificate ( isA ( java . security . cert . Certificate . class ) , eq ( "test" ) ) ; verify ( databaseFreezeService ) . checkUnfrozen ( "Unable<sp>to<sp>import<sp>a<sp>certificate<sp>while<sp>database<sp>is<sp>frozen." ) ; } importTrustCertificate ( java . lang . String , java . lang . String ) { java . security . cert . Certificate certificate = org . sonatype . nexus . ssl . CertificateUtil . decodePEMFormattedCertificate ( certificateInPEM ) ; importTrustCertificate ( certificate , alias ) ; }
org . junit . Assert . assertNotNull ( certAdded )
testDisposeBrowser ( ) { org . eclipse . swt . browser . BrowserFunction function = new org . eclipse . swt . browser . BrowserFunction ( browser , org . eclipse . swt . browser . BrowserFunction_Test . FUNC ) ; browser . dispose ( ) ; "<AssertPlaceHolder>" ; } isDisposed ( ) { org . eclipse . swt . widgets . Control c = getMessageControl ( ) ; return ( c != null ) && ( c . isDisposed ( ) ) ; }
org . junit . Assert . assertTrue ( function . isDisposed ( ) )
iteratesStreamEventsFromEndToStartWithLargeBatchSize ( ) { final java . lang . String stream = generateStreamName ( ) ; eventstore . appendToStream ( stream , ExpectedVersion . NO_STREAM , newTestEvents ( 10 ) ) . join ( ) ; java . util . Iterator < com . github . msemys . esjc . ResolvedEvent > iterator = eventstore . iterateStreamEventsBackward ( stream , StreamPosition . END , 20 , false ) ; "<AssertPlaceHolder>" ; } hasSize ( int ) { return new com . github . msemys . esjc . matcher . IteratorSizeMatcher ( size ) ; }
org . junit . Assert . assertThat ( iterator , hasSize ( 10 ) )
testFrom ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } from ( ) { return surroundWithSpaces ( "FROM" ) ; }
org . junit . Assert . assertNotNull ( dbms . from ( ) )
test2PlainJarWithAdditionalNonMaven ( ) { final org . eclipse . packagedrone . repo . channel . ArtifactInformation a1 = makeArtifact ( "a1" , null , "foobar" , null ) ; final java . util . Map < java . lang . String , org . eclipse . packagedrone . repo . channel . ArtifactInformation > map = makeMap ( a1 ) ; { final java . util . Collection < org . eclipse . packagedrone . repo . adapter . maven . MavenInformation > result = org . eclipse . packagedrone . repo . adapter . maven . internal . MavenRepositoryChannelAggregator . getInfos ( a1 , map ) ; "<AssertPlaceHolder>" ; } } getInfos ( org . eclipse . packagedrone . repo . channel . ArtifactInformation , java . util . Map ) { final java . util . Set < org . eclipse . packagedrone . repo . adapter . maven . MavenInformation > infos = new java . util . HashSet ( ) ; { final org . eclipse . packagedrone . repo . adapter . maven . MavenInformation coords = org . eclipse . packagedrone . repo . adapter . maven . internal . MavenRepositoryChannelAggregator . parseMavenCoordinates ( art . getMetaData ( ) , null ) ; if ( coords != null ) { infos . add ( coords ) ; } } final java . util . Collection < org . eclipse . packagedrone . repo . channel . ArtifactInformation > pomArts = org . eclipse . packagedrone . repo . adapter . maven . internal . MavenRepositoryChannelAggregator . findPomArtifacts ( art , map ) ; for ( final org . eclipse . packagedrone . repo . channel . ArtifactInformation pomArt : pomArts ) { final org . eclipse . packagedrone . repo . adapter . maven . MavenInformation coords = org . eclipse . packagedrone . repo . adapter . maven . internal . MavenRepositoryChannelAggregator . parseMavenCoordinates ( pomArt . getMetaData ( ) , art ) ; if ( coords != null ) { infos . add ( coords ) ; } } return infos ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testPcrMatchesConstantPolicyFail ( ) { test . policy . Pcr expected = new test . policy . PcrSha1 ( 0 , "aabbccddeeaabbccddeeaabbccddeeaabbccddee" ) ; test . policy . Pcr actual = new test . policy . PcrSha1 ( 0 , "aabbccddeeaabbccddeeaabbccddeeaabbccdd00" ) ; test . policy . PcrMatchesConstant policy = new test . policy . PcrMatchesConstant ( expected ) ; test . policy . HostReport hostReport = new test . policy . HostReport ( ) ; hostReport . pcrManifest = new test . policy . PcrManifest ( ) ; hostReport . pcrManifest . setPcr ( actual ) ; test . policy . RuleResult report = policy . apply ( hostReport ) ; "<AssertPlaceHolder>" ; printReport ( report ) ; printReportJson ( report ) ; } isTrusted ( ) { return faults . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( report . isTrusted ( ) )
findsLongestNameByReduce ( ) { com . insightfullogic . java8 . examples . chapter1 . Artist artist = com . insightfullogic . java8 . answers . chapter5 . com . insightfullogic . java8 . answers . chapter5 . LongestName . byReduce ( com . insightfullogic . java8 . examples . chapter1 . SampleData . getThreeArtists ( ) ) ; "<AssertPlaceHolder>" ; } getThreeArtists ( ) { return java . util . Arrays . asList ( com . insightfullogic . java8 . examples . chapter1 . SampleData . johnColtrane , com . insightfullogic . java8 . examples . chapter1 . SampleData . johnLennon , com . insightfullogic . java8 . examples . chapter1 . SampleData . theBeatles ) ; }
org . junit . Assert . assertEquals ( SampleData . johnColtrane , artist )
deveObterCpfComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; retornoConsultaCadastroDados . setCpf ( "24868707841" ) ; "<AssertPlaceHolder>" ; } getCpf ( ) { return this . cpf ; }
org . junit . Assert . assertEquals ( "24868707841" , retornoConsultaCadastroDados . getCpf ( ) )
testRequestUriAbsolute ( ) { boolean isValidUri = servlet . isUriValid ( com . adobe . acs . commons . dispatcher . impl . PermissionSensitiveCacheServletTest . TEST_PAGE ) ; "<AssertPlaceHolder>" ; } isUriValid ( java . lang . String ) { boolean isValidUri = true ; if ( ! ( org . apache . commons . lang3 . StringUtils . startsWith ( requestUri , "/" ) ) ) { isValidUri = false ; } return isValidUri ; }
org . junit . Assert . assertTrue ( isValidUri )
getLineBreak_A$_CRLF_NEW_FILE_ONLY_1 ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; config . lineBreakPolicy = org . junithelper . core . config . LineBreakPolicy . forceNewFileCRLF ; org . junithelper . core . meta . CurrentLineBreak currentLineBreak = org . junithelper . core . meta . CurrentLineBreak . LF ; org . junithelper . core . generator . LineBreakProvider target = new org . junithelper . core . generator . LineBreakProvider ( config , currentLineBreak ) ; java . lang . String actual = target . getLineBreak ( ) ; java . lang . String expected = "\n" ; "<AssertPlaceHolder>" ; } getLineBreak ( ) { if ( config . lineBreakPolicy . equals ( LineBreakPolicy . forceCRLF ) ) { return ( org . junithelper . core . constant . StringValue . CarriageReturn ) + ( org . junithelper . core . constant . StringValue . LineFeed ) ; } else if ( config . lineBreakPolicy . equals ( LineBreakPolicy . forceLF ) ) { return org . junithelper . core . constant . StringValue . LineFeed ; } else if ( config . lineBreakPolicy . equals ( LineBreakPolicy . forceNewFileCRLF ) ) { if ( ( currentLineBreak ) == null ) { return ( org . junithelper . core . constant . StringValue . CarriageReturn ) + ( org . junithelper . core . constant . StringValue . LineFeed ) ; } else { return getLineBreakFromCurrentLineBreak ( currentLineBreak ) ; } } else if ( config . lineBreakPolicy . equals ( LineBreakPolicy . forceNewFileLF ) ) { if ( ( currentLineBreak ) == null ) { return org . junithelper . core . constant . StringValue . LineFeed ; } else { return getLineBreakFromCurrentLineBreak ( currentLineBreak ) ; } } return ( org . junithelper . core . constant . StringValue . CarriageReturn ) + ( org . junithelper . core . constant . StringValue . LineFeed ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
UmlLinkType_NotFromParameterDeclaration ( ) { java . lang . String fromClass = "Domain.Direct.Violating.DeclarationParameter" ; java . lang . String toClass = "Technology.Direct.Dao.ProfileDAO" ; "<AssertPlaceHolder>" ; } isUmlLinkNotDetected ( java . lang . String , java . lang . String ) { boolean umlLinkDetected = true ; husaccttest . analyse . Java_AccuracyTestDependencyDetection . analyseService = husacct . ServiceProvider . getInstance ( ) . getAnalyseService ( ) ; husacct . common . dto . UmlLinkDTO [ ] umlLinkDTOs = husaccttest . analyse . Java_AccuracyTestDependencyDetection . analyseService . getUmlLinksFromClassToToClass ( classFrom , classTo ) ; for ( husacct . common . dto . UmlLinkDTO linkDTO : umlLinkDTOs ) { if ( ( linkDTO . from . equals ( classFrom ) ) && ( linkDTO . to . equals ( classTo ) ) ) { umlLinkDetected = false ; } } return umlLinkDetected ; }
org . junit . Assert . assertTrue ( isUmlLinkNotDetected ( fromClass , toClass ) )
testTrailingBackslash ( ) { final java . lang . String s = "a\\" ; try { this . valueConverterService . toValue ( s , "ID" , null ) ; } catch ( final java . lang . Throwable _t ) { if ( _t instanceof org . eclipse . xtext . conversion . ValueConverterWithValueException ) { final org . eclipse . xtext . conversion . ValueConverterWithValueException e = ( ( org . eclipse . xtext . conversion . ValueConverterWithValueException ) ( _t ) ) ; java . lang . Object _value = e . getValue ( ) ; final java . lang . String value = ( ( java . lang . String ) ( _value ) ) ; "<AssertPlaceHolder>" ; } else { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( _t ) ; } } } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( "a" , value )
testEvalueerExpressie ( ) { final nl . bzk . brp . domain . expressie . Expressie expressie = nl . bzk . brp . domain . expressie . parser . ExpressieParser . parse ( java . lang . String . format ( "BSN<sp>=<sp>\"%s\"" , nl . bzk . brp . service . algemeen . expressie . ExpressieServiceImplTest . BSN ) ) ; final java . lang . Boolean isWaar = expressieService . evalueer ( expressie , nl . bzk . brp . service . algemeen . expressie . ExpressieServiceImplTest . PERSOONSLIJST ) ; "<AssertPlaceHolder>" ; } evalueer ( java . lang . String , nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig ) { final nl . bzk . brp . expressietaal . parser . ParserResultaat resultaat = nl . bzk . brp . expressietaal . parser . BRPExpressies . parse ( expressieString ) ; final nl . bzk . brp . expressietaal . Expressie expressie ; if ( ( resultaat . getExpressie ( ) ) != null ) { expressie = nl . bzk . brp . expressietaal . parser . BRPExpressies . evalueer ( resultaat . getExpressie ( ) , persoon ) ; } else { expressie = new nl . bzk . brp . expressietaal . expressies . FoutExpressie ( nl . bzk . brp . expressietaal . EvaluatieFoutCode . INCORRECTE_EXPRESSIE , expressieString ) ; } return expressie ; }
org . junit . Assert . assertThat ( isWaar , org . hamcrest . core . Is . is ( true ) )
setUserAgent ( ) { java . lang . String url = "https://github.com/m3dev" ; com . m3 . curly . Request request = new com . m3 . curly . Request ( url ) ; request . setUserAgent ( "foo" ) ; "<AssertPlaceHolder>" ; } getUserAgent ( ) { if ( ( headers . get ( "User-Agent" ) ) != null ) { return headers . get ( "User-Agent" ) ; } else { return userAgent ; } }
org . junit . Assert . assertThat ( request . getUserAgent ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "foo" ) ) )
should_not_create_indel_for_XNX_placeholder ( ) { for ( htsjdk . samtools . SAMRecord r : new htsjdk . samtools . SAMRecord [ ] { Read ( 0 , 1 , "1X10S" ) , Read ( 0 , 1 , "2X10S" ) , Read ( 0 , 1 , "1X1N1X10S" ) , Read ( 0 , 1 , "1X100N1X10S" ) } ) { java . util . List < au . edu . wehi . idsv . IndelEvidence > list = au . edu . wehi . idsv . IndelEvidence . create ( SES ( ) , 0 , r ) ; "<AssertPlaceHolder>" ; } } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , list . size ( ) )
testSetNetworkTimeoutEnforcement ( ) { java . sql . Connection conn = org . postgresql . test . TestUtil . openDB ( ) ; java . sql . Statement stmt = null ; try { conn . setNetworkTimeout ( null , ( ( int ) ( TimeUnit . SECONDS . toMillis ( 1 ) ) ) ) ; stmt = conn . createStatement ( ) ; stmt . execute ( "SELECT<sp>pg_sleep(2)" ) ; org . junit . Assert . fail ( "Connection.setNetworkTimeout()<sp>did<sp>not<sp>throw<sp>expected<sp>exception" ) ; } catch ( java . sql . SQLException e ) { "<AssertPlaceHolder>" ; } finally { org . postgresql . test . TestUtil . closeQuietly ( stmt ) ; org . postgresql . test . TestUtil . closeDB ( conn ) ; } } isClosed ( ) { return ( rows ) == null ; }
org . junit . Assert . assertTrue ( conn . isClosed ( ) )
testFirstFilter2 ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; java . lang . String source = "{{<sp>['name',2*5]<sp>|<sp>first<sp>}}" ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( source ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer , new java . util . HashMap ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "name" , writer . toString ( ) )
createRemoteStartTransactionRequest_withIdToken_returnsValidRemoteStartTransactionRequest ( ) { java . lang . String idToken = "Some<sp>IdToken" ; eu . chargetime . ocpp . model . core . RemoteStartTransactionRequest result = core . createRemoteStartTransactionRequest ( idToken ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; }
org . junit . Assert . assertThat ( result . validate ( ) , org . hamcrest . CoreMatchers . is ( true ) )
matchPatternNullTest ( ) { java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( UtilitiesConstantsTestInterface . REGEX ) ; boolean check = org . jumbune . utils . PatternMatcher . match ( null , pattern ) ; "<AssertPlaceHolder>" ; } match ( org . apache . hadoop . io . Writable , java . lang . String ) { if ( value == null ) { return false ; } java . lang . String valueStr = value . toString ( ) ; if ( ( valueStr == null ) || ( ( valueStr . length ( ) ) == 0 ) ) { return false ; } java . util . regex . Pattern p = java . util . regex . Pattern . compile ( regex ) ; java . util . regex . Matcher m = p . matcher ( valueStr ) ; return m . matches ( ) ; }
org . junit . Assert . assertFalse ( check )
postProcessBeanFactory ( ) { de . blizzy . documentr . context . EventBusBeanFactoryPostProcessor beanFactoryPostProcessor = new de . blizzy . documentr . context . EventBusBeanFactoryPostProcessor ( ) ; beanFactoryPostProcessor . postProcessBeanFactory ( beanFactory ) ; org . mockito . ArgumentCaptor < org . springframework . beans . factory . config . BeanPostProcessor > captor = org . mockito . ArgumentCaptor . forClass ( org . springframework . beans . factory . config . BeanPostProcessor . class ) ; verify ( beanFactory ) . addBeanPostProcessor ( captor . capture ( ) ) ; "<AssertPlaceHolder>" ; } postProcessBeanFactory ( org . springframework . beans . factory . config . ConfigurableListableBeanFactory ) { de . blizzy . documentr . context . EventBusBeanPostProcessor eventBusBeanPostProcessor = new de . blizzy . documentr . context . EventBusBeanPostProcessor ( beanFactory ) ; beanFactory . addBeanPostProcessor ( eventBusBeanPostProcessor ) ; }
org . junit . Assert . assertTrue ( ( ( captor . getValue ( ) ) instanceof de . blizzy . documentr . context . EventBusBeanPostProcessor ) )
testMySQL ( ) { final java . lang . String zoneStackName = "vpc/zone-legacy.yaml" 2 + ( this . random8String ( ) ) ; final java . lang . String vpcStackName = "CloudFrontAcmCertificate" 3 + ( this . random8String ( ) ) ; final java . lang . String stackName = "CloudFrontAcmCertificate" 6 + ( this . random8String ( ) ) ; final java . lang . String classB = "CloudFrontAcmCertificate" 9 ; final java . lang . String keyName = "key-" + ( this . random8String ( ) ) ; final java . lang . String subDomainName = stackName ; final java . lang . String blogTitle = "Stay-AWSome" ; final java . lang . String blogPassword = this . random8String ( ) ; try { this . createKey ( keyName ) ; try { this . createStack ( zoneStackName , "vpc/zone-legacy.yaml" , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 8 ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . DOMAIN_SUFFIX ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 5 ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . HOSTED_ZONE_ID ) ) ) ; try { this . createStack ( vpcStackName , "vpc/zone-legacy.yaml" 4 , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 2 ) . withParameterValue ( classB ) ) ; try { this . createStack ( stackName , "vpc/zone-legacy.yaml" 0 , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "ParentVPCStack" ) . withParameterValue ( vpcStackName ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 1 ) . withParameterValue ( zoneStackName ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 3 ) . withParameterValue ( keyName ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "SubDomainNameWithDot" ) . withParameterValue ( ( subDomainName + "." ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . CLOUDFRONT_ACM_CERTIFICATE_ARN ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 7 ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . ACM_CERTIFICATE_ARN ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 5 ) . withParameterValue ( blogTitle ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 4 ) . withParameterValue ( "admin" ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 6 ) . withParameterValue ( blogPassword ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 0 ) . withParameterValue ( "no-reply@widdix.de" ) ) ; final java . lang . String url = ( ( "https://" + subDomainName ) + "." ) + ( de . widdix . awscftemplates . Config . get ( Config . Key . DOMAIN_SUFFIX ) ) ; final java . util . concurrent . Callable < java . lang . String > callable = ( ) -> { final org . apache . http . HttpResponse response = de . taimos . httputils . WS . url ( url ) . timeout ( 10000 ) . get ( ) ; if ( ( de . taimos . httputils . WS . getStatus ( response ) ) != 200 ) { throw new java . lang . RuntimeException ( ( "vpc/zone-legacy.yaml" 1 + ( de . taimos . httputils . WS . getStatus ( response ) ) ) ) ; } return de . taimos . httputils . WS . getResponseAsString ( response ) ; } ; final java . lang . String response = this . retry ( callable ) ; "<AssertPlaceHolder>" ; } finally { this . deleteStackAndRetryOnFailure ( stackName ) ; } } finally { this . deleteStack ( vpcStackName ) ; } } finally { this . deleteStack ( zoneStackName ) ; } } finally { this . deleteKey ( keyName ) ; } } retry ( java . util . concurrent . Callable ) { final java . util . concurrent . Callable < T > wrapper = ( ) -> { try { return callable . call ( ) ; } catch ( final e ) { System . out . println ( ( "retry[]<sp>exception:<sp>" + ( de . widdix . awscftemplates . e . getMessage ( ) ) ) ) ; de . widdix . awscftemplates . e . printStackTrace ( ) ; throw de . widdix . awscftemplates . e ; } } ; final com . evanlennick . retry4j . RetryConfig config = new com . evanlennick . retry4j . RetryConfigBuilder ( ) . retryOnAnyException ( ) . withMaxNumberOfTries ( 30 ) . withDelayBetweenTries ( 10 , ChronoUnit . SECONDS ) . withFixedBackoff ( ) . build ( ) ; final com . evanlennick . retry4j . CallResults < java . lang . Object > results = new com . evanlennick . retry4j . CallExecutor ( config ) . execute ( wrapper ) ; return ( ( T ) ( results . getResult ( ) ) ) ; }
org . junit . Assert . assertTrue ( response . contains ( blogTitle ) )
isReadOnlyShouldReturnTrue ( ) { openConnection . setReadOnly ( true ) ; "<AssertPlaceHolder>" ; } isReadOnly ( ) { return this . connection . isReadOnly ( ) ; }
org . junit . Assert . assertTrue ( openConnection . isReadOnly ( ) )
appleToolchainPathsBuiltFromDirectory ( ) { java . nio . file . Path root = java . nio . file . Paths . get ( "test/com/facebook/buck/apple/testdata/toolchain-discovery" ) ; com . google . common . collect . ImmutableMap < java . lang . String , com . facebook . buck . apple . toolchain . AppleToolchain > expected = com . google . common . collect . ImmutableMap . of ( "com.facebook.bar.toolchain.XcodeDefault" , com . facebook . buck . apple . toolchain . AppleToolchain . builder ( ) . setIdentifier ( "com.facebook.bar.toolchain.XcodeDefault" ) . setVersion ( "23B456" ) . setPath ( root . resolve ( "Toolchains/bar.xctoolchain" ) ) . build ( ) , "tc-03_21-2018_05_10.swift.20180510" , com . facebook . buck . apple . toolchain . AppleToolchain . builder ( ) . setIdentifier ( "tc-03_21-2018_05_10.swift.20180510" ) . setPath ( root . resolve ( "Toolchains/baz.xctoolchain" ) ) . build ( ) , "com.facebook.foo.toolchain.XcodeDefault" , com . facebook . buck . apple . toolchain . AppleToolchain . builder ( ) . setIdentifier ( "com.facebook.foo.toolchain.XcodeDefault" ) . setVersion ( "23B456" ) . setPath ( root . resolve ( "Toolchains/foo.xctoolchain" ) ) . build ( ) ) ; "<AssertPlaceHolder>" ; } discoverAppleToolchains ( java . util . Optional , com . google . common . collect . ImmutableList ) { ImmutableMap . Builder < java . lang . String , com . facebook . buck . apple . toolchain . AppleToolchain > toolchainIdentifiersToToolchainsBuilder = com . google . common . collect . ImmutableMap . builder ( ) ; java . util . HashSet < java . nio . file . Path > toolchainPaths = new java . util . HashSet < java . nio . file . Path > ( extraDirs ) ; if ( developerDir . isPresent ( ) ) { java . nio . file . Path toolchainsDir = developerDir . get ( ) . resolve ( "Toolchains" ) ; com . facebook . buck . apple . toolchain . impl . AppleToolchainDiscovery . LOG . debug ( "Searching<sp>for<sp>Xcode<sp>toolchains<sp>under<sp>%s" , toolchainsDir ) ; toolchainPaths . add ( toolchainsDir ) ; } for ( java . nio . file . Path toolchains : toolchainPaths ) { if ( ! ( java . nio . file . Files . exists ( toolchains ) ) ) { com . facebook . buck . apple . toolchain . impl . AppleToolchainDiscovery . LOG . debug ( "Skipping<sp>toolchain<sp>search<sp>path<sp>%s<sp>that<sp>does<sp>not<sp>exist" , toolchains ) ; continue ; } com . facebook . buck . apple . toolchain . impl . AppleToolchainDiscovery . LOG . debug ( "Searching<sp>for<sp>Xcode<sp>toolchains<sp>in<sp>%s" , toolchains ) ; try ( java . nio . file . DirectoryStream < java . nio . file . Path > toolchainStream = java . nio . file . Files . newDirectoryStream ( toolchains , "*.xctoolchain" ) ) { for ( java . nio . file . Path toolchainPath : com . google . common . collect . ImmutableSortedSet . copyOf ( toolchainStream ) ) { com . facebook . buck . apple . toolchain . impl . AppleToolchainDiscovery . LOG . debug ( "Getting<sp>identifier<sp>for<sp>for<sp>Xcode<sp>toolchain<sp>under<sp>%s" , toolchainPath ) ; addIdentifierForToolchain ( toolchainPath , toolchainIdentifiersToToolchainsBuilder ) ; } } } return toolchainIdentifiersToToolchainsBuilder . build ( ) ; }
org . junit . Assert . assertThat ( com . facebook . buck . apple . toolchain . impl . AppleToolchainDiscovery . discoverAppleToolchains ( java . util . Optional . of ( root ) , com . google . common . collect . ImmutableList . of ( ) ) , org . hamcrest . Matchers . equalTo ( expected ) )
testBisnoryagoninDataSet ( ) { final double deviation = 14.0 ; final double precursorMass = 231.0647 ; final io . github . msdk . datamodel . IonType ion = io . github . msdk . util . IonTypeUtil . createIonType ( "[M+H]+" ) ; final java . lang . String [ ] expectedResults = new java . lang . String [ ] { "C13H10O4" , "O" 5 , "C11H8N3O3" , "O" 3 } ; final java . lang . String ms1Path = "bisnoryangonin_MS1.txt" ; final java . lang . String ms2Path = "bisnoryangonin_MS2.txt" ; final org . openscience . cdk . formula . MolecularFormulaRange range = new org . openscience . cdk . formula . MolecularFormulaRange ( ) ; org . openscience . cdk . config . IsotopeFactory iFac = org . openscience . cdk . config . Isotopes . getInstance ( ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 2 ) , 0 , Integer . MAX_VALUE ) ; range . addIsotope ( iFac . getMajorIsotope ( "H" ) , 0 , Integer . MAX_VALUE ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 7 ) , 0 , Integer . MAX_VALUE ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" ) , 0 , Integer . MAX_VALUE ) ; range . addIsotope ( iFac . getMajorIsotope ( "P" ) , 0 , Integer . MAX_VALUE ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 1 ) , 0 , 0 ) ; range . addIsotope ( iFac . getMajorIsotope ( "B" ) , 0 , 0 ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 8 ) , 0 , 0 ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 0 ) , 0 , 0 ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 4 ) , 0 , Integer . MAX_VALUE ) ; range . addIsotope ( iFac . getMajorIsotope ( "O" 6 ) , 0 , 0 ) ; range . addIsotope ( iFac . getMajorIsotope ( "Se" ) , 0 , 0 ) ; final de . unijena . bioinf . ChemistryBase . chem . FormulaConstraints constraints = io . github . msdk . id . sirius . ConstraintsGenerator . generateConstraint ( range ) ; java . io . File ms1File = getResourcePath ( ms1Path ) . toFile ( ) ; java . io . File ms2File = getResourcePath ( ms2Path ) . toFile ( ) ; io . github . msdk . datamodel . MsSpectrum ms1Spectrum = io . github . msdk . io . txt . TxtImportAlgorithm . parseMsSpectrum ( new java . io . FileReader ( ms1File ) ) ; io . github . msdk . datamodel . MsSpectrum ms2Spectrum = io . github . msdk . io . txt . TxtImportAlgorithm . parseMsSpectrum ( new java . io . FileReader ( ms2File ) ) ; java . util . LinkedList < io . github . msdk . datamodel . MsSpectrum > ms1list = new java . util . LinkedList ( ) ; java . util . LinkedList < io . github . msdk . datamodel . MsSpectrum > ms2list = new java . util . LinkedList ( ) ; ms1list . add ( ms1Spectrum ) ; ms2list . add ( ms2Spectrum ) ; io . github . msdk . id . sirius . SiriusIdentificationMethod siriusMethod = new io . github . msdk . id . sirius . SiriusIdentificationMethod ( ms1list , ms2list , precursorMass , ion , expectedResults . length , constraints , deviation ) ; java . util . List < de . unijena . bioinf . sirius . IdentificationResult > list = siriusMethod . siriusProcessSpectra ( ) ; java . lang . String [ ] results = new java . lang . String [ list . size ( ) ] ; int i = 0 ; for ( de . unijena . bioinf . sirius . IdentificationResult r : list ) { results [ ( i ++ ) ] = r . getMolecularFormula ( ) . toString ( ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "[" + ( io . github . msdk . io . chromatof . Pair . getKey ( ) ) ) + "," ) + ( io . github . msdk . io . chromatof . Pair . getValue ( ) ) ) + "]" ; }
org . junit . Assert . assertArrayEquals ( expectedResults , results )
testMoveUp ( ) { final double initialY = instance . y ( ) ; instance . moveUp ( 3.5 ) ; edu . illinois . library . cantaloupe . image . Rectangle expected = new edu . illinois . library . cantaloupe . image . Rectangle ( instance . x ( ) , ( initialY - 3.5 ) , instance . width ( ) , instance . height ( ) ) ; "<AssertPlaceHolder>" ; } height ( ) { return height ; }
org . junit . Assert . assertEquals ( expected , instance )
testGetData ( ) { edu . oswego . csc480_hci521_2013 . client . ui . TreePanelView tpv = null ; edu . oswego . csc480_hci521_2013 . shared . h2o . json . RFTreeView data = rft ; java . lang . String data_key = null ; java . lang . String model_key = null ; int treeIndex = 0 ; System . out . println ( "getData" ) ; edu . oswego . csc480_hci521_2013 . client . presenters . TreePanelPresenterImpl instance = new edu . oswego . csc480_hci521_2013 . client . presenters . TreePanelPresenterImpl ( tpv , data , data_key , model_key , treeIndex ) ; edu . oswego . csc480_hci521_2013 . shared . h2o . json . RFTreeView expResult = rft ; edu . oswego . csc480_hci521_2013 . shared . h2o . json . RFTreeView result = instance . getData ( ) ; "<AssertPlaceHolder>" ; } getData ( ) { return data ; }
org . junit . Assert . assertEquals ( expResult , result )
testStream ( ) { io . kubernetes . client . models . V1Pod pod = new io . kubernetes . client . models . V1Pod ( ) . metadata ( new io . kubernetes . client . models . V1ObjectMeta ( ) . name ( podName ) . namespace ( namespace ) ) . spec ( new io . kubernetes . client . models . V1PodSpec ( ) . containers ( java . util . Arrays . asList ( new io . kubernetes . client . models . V1Container ( ) . name ( container ) . image ( "nginx" ) ) ) ) ; java . lang . String content = "this<sp>is<sp>some\n<sp>content<sp>for<sp>\n<sp>various<sp>logs<sp>\n<sp>done" ; stubFor ( get ( urlPathEqualTo ( ( ( ( ( "previous" 2 + ( namespace ) ) + "previous" 3 ) + ( podName ) ) + "/log" ) ) ) . willReturn ( aResponse ( ) . withStatus ( 200 ) . withHeader ( "previous" 1 , "previous" 0 ) . withBody ( content ) ) ) ; io . kubernetes . client . PodLogs logs = new io . kubernetes . client . PodLogs ( client ) ; java . io . InputStream is = logs . streamNamespacedPodLog ( pod ) ; verify ( getRequestedFor ( urlPathEqualTo ( ( ( ( ( "previous" 2 + ( namespace ) ) + "previous" 3 ) + ( podName ) ) + "/log" ) ) ) . withQueryParam ( "container" , equalTo ( container ) ) . withQueryParam ( "follow" , equalTo ( "true" ) ) . withQueryParam ( "pretty" , equalTo ( "false" ) ) . withQueryParam ( "previous" , equalTo ( "false" ) ) . withQueryParam ( "timestamps" , equalTo ( "false" ) ) ) ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; com . google . common . io . ByteStreams . copy ( is , bos ) ; "<AssertPlaceHolder>" ; } toString ( ) { return isInt ? java . lang . String . valueOf ( intValue ) : strValue ; }
org . junit . Assert . assertEquals ( content , bos . toString ( ) )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . Company > companies = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( companies . isEmpty ( ) )
test206ContainsETagIfA200ResponseWouldHaveIncludedIt ( ) { final org . apache . hc . core5 . http . ClassicHttpRequest req1 = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "/" ) ; originResponse . addHeader ( "Cache-Control" , "max-age=3600" ) ; originResponse . addHeader ( "ETag" , "\"etag1\"" ) ; final org . apache . hc . core5 . http . ClassicHttpRequest req2 = new org . apache . hc . core5 . http . message . BasicClassicHttpRequest ( "GET" , "/" ) ; req2 . addHeader ( "Range" , "bytes=0-50" ) ; backendExpectsAnyRequest ( ) . andReturn ( originResponse ) . times ( 1 , 2 ) ; replayMocks ( ) ; execute ( req1 ) ; final org . apache . hc . core5 . http . ClassicHttpResponse result = execute ( req2 ) ; verifyMocks ( ) ; if ( ( result . getCode ( ) ) == ( org . apache . hc . core5 . http . HttpStatus . SC_PARTIAL_CONTENT ) ) { "<AssertPlaceHolder>" ; } } getFirstHeader ( java . lang . String ) { return ( headergroup ) != null ? headergroup . getFirstHeader ( name ) : null ; }
org . junit . Assert . assertNotNull ( result . getFirstHeader ( "ETag" ) )
testAxialEncoder_Empty ( ) { org . openscience . cdk . interfaces . IAtomContainer container = mock ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . interfaces . IAtom start = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IAtom end = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; when ( container . getConnectedBondsList ( start ) ) . thenReturn ( java . util . Collections . < org . openscience . cdk . interfaces . IBond > emptyList ( ) ) ; when ( container . getConnectedBondsList ( end ) ) . thenReturn ( java . util . Collections . < org . openscience . cdk . interfaces . IBond > emptyList ( ) ) ; "<AssertPlaceHolder>" ; } axialEncoder ( org . openscience . cdk . interfaces . IAtomContainer , org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom ) { java . util . List < org . openscience . cdk . interfaces . IBond > startBonds = container . getConnectedBondsList ( start ) ; java . util . List < org . openscience . cdk . interfaces . IBond > endBonds = container . getConnectedBondsList ( end ) ; if ( ( ( startBonds . size ( ) ) < 2 ) || ( ( endBonds . size ( ) ) < 2 ) ) return null ; if ( ( org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . has2DCoordinates ( startBonds ) ) && ( org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . has2DCoordinates ( endBonds ) ) ) { return org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . axial2DEncoder ( container , start , startBonds , end , endBonds ) ; } else if ( ( org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . has3DCoordinates ( startBonds ) ) && ( org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . has3DCoordinates ( endBonds ) ) ) { return org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . axial3DEncoder ( container , start , startBonds , end , endBonds ) ; } return null ; }
org . junit . Assert . assertNull ( org . openscience . cdk . hash . stereo . GeometricCumulativeDoubleBondFactory . axialEncoder ( container , start , end ) )
instantiation ( ) { com . github . seratch . taskun . inject . GuiceTaskunServletInjector target = new com . github . seratch . taskun . inject . GuiceTaskunServletInjector ( new com . google . inject . AbstractModule ( ) { @ com . github . seratch . taskun . inject . Override protected void configure ( ) { } } ) ; "<AssertPlaceHolder>" ; } configure ( ) { }
org . junit . Assert . assertNotNull ( target )
testSearchExactDescriptionCaseSensitive ( ) { int total = 5 ; for ( int i = 0 ; i < total ; i ++ ) { com . liferay . data . engine . service . test . DEDataEngineTestUtil . insertDEDataRecordCollection ( _adminUser , _group , ( "Description" + i ) , ( "Name" + i ) , _deDataDefinitionService , _deDataRecordCollectionService ) ; } java . util . List < com . liferay . data . engine . model . DEDataRecordCollection > deDataRecordCollections = searchDEDataRecordCollection ( _group , "Description1" ) ; com . liferay . portal . search . test . util . IdempotentRetryAssert . retryAssert ( 6 , TimeUnit . SECONDS , ( ) -> { "<AssertPlaceHolder>" ; return null ; } ) ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( deDataRecordCollections . toString ( ) , 1 , deDataRecordCollections . size ( ) )
getGoldItemsTest ( ) { java . lang . String query = "declare<sp>variable<sp>$word<sp>external;\n" + ( ( ( "let<sp>$auction<sp>:=<sp>doc(\"auction.xml\")<sp>return\n" + "for<sp>$i<sp>in<sp>$auction/site//item\n" ) + "where<sp>contains(string(exactly-one($i/description)),<sp>$word)\n" ) + "return<sp>$i/name/text()" ) ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap ( ) ; params . put ( "word" , "gold" ) ; try ( com . bagri . core . api . ResultCursor < javax . xml . xquery . XQItemAccessor > results = query ( query , params , null ) ) { int cnt = 0 ; for ( javax . xml . xquery . XQItemAccessor item : results ) { cnt ++ ; } "<AssertPlaceHolder>" ; } } query ( java . lang . String , java . util . Map , java . util . Properties ) { if ( props == null ) { props = getDocumentProperties ( ) ; props . setProperty ( pn_document_headers , java . lang . String . valueOf ( DocumentAccessor . HDR_CONTENT ) ) ; } com . bagri . core . api . ResultCursor < javax . xml . xquery . XQItemAccessor > result = getQueryManagement ( ) . executeQuery ( query , params , props ) ; org . junit . Assert . assertNotNull ( result ) ; return result ; }
org . junit . Assert . assertEquals ( 2 , cnt )
isSet ( ) { org . slf4j . MDC . put ( org . sonatype . nexus . security . UserIdMdcHelper . KEY , "test" ) ; "<AssertPlaceHolder>" ; } isSet ( ) { org . slf4j . MDC . put ( org . sonatype . nexus . security . UserIdMdcHelper . KEY , "test" ) ; org . junit . Assert . assertThat ( org . sonatype . nexus . security . UserIdMdcHelper . isSet ( ) , org . hamcrest . Matchers . is ( true ) ) ; }
org . junit . Assert . assertThat ( org . sonatype . nexus . security . UserIdMdcHelper . isSet ( ) , org . hamcrest . Matchers . is ( true ) )
testDeleteStagingDir ( ) { java . lang . String testName = "deleteStagingDir" ; java . lang . String dbName = org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . createDB ( testName , org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driver ) ; java . lang . String replDbName = dbName + "_dupe" ; java . lang . String tableName = "_dupe" 0 ; org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . run ( ( ( "_dupe" 1 + ( org . apache . hadoop . hive . ql . stats . StatsUtils . getFullyQualifiedTableName ( dbName , tableName ) ) ) + "_dupe" 8 ) , org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driver ) ; java . lang . String [ ] unptn_data = new java . lang . String [ ] { "one" , "two" } ; java . lang . String unptn_locn = new org . apache . hadoop . fs . Path ( org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . TEST_PATH , ( testName + "_dupe" 4 ) ) . toUri ( ) . getPath ( ) ; org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . createTestDataFile ( unptn_locn , unptn_data ) ; org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . run ( ( ( ( ( "LOAD<sp>DATA<sp>LOCAL<sp>INPATH<sp>'" + unptn_locn ) + "_dupe" 2 ) + dbName ) + ".unptned" ) , org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driver ) ; verifySetup ( ( ( "SELECT<sp>*<sp>from<sp>" + dbName ) + ".unptned" ) , unptn_data , org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driver ) ; java . lang . String replDumpLocn = replDumpDb ( dbName , null , null , null ) . dumpLocation ; org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driverMirror . close ( ) ; org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . run ( ( ( ( ( "_dupe" 3 + replDbName ) + "_dupe" 6 ) + replDumpLocn ) + "_dupe" 5 ) , org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driverMirror ) ; org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . driverMirror . close ( ) ; org . apache . hadoop . fs . Path warehouse = new org . apache . hadoop . fs . Path ( java . lang . System . getProperty ( "test.warehouse.dir" , "_dupe" 7 ) ) ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( warehouse . toUri ( ) , org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . hconf ) ; try { org . apache . hadoop . fs . Path path = new org . apache . hadoop . fs . Path ( warehouse , ( ( ( replDbName + ".db" ) + ( org . apache . hadoop . fs . Path . SEPARATOR ) ) + tableName ) ) ; if ( ! ( fs . exists ( path ) ) ) { return ; } org . apache . hadoop . fs . PathFilter filter = new org . apache . hadoop . fs . PathFilter ( ) { @ org . apache . hadoop . hive . ql . parse . Override public boolean accept ( org . apache . hadoop . fs . Path path ) { return path . getName ( ) . startsWith ( org . apache . hadoop . hive . conf . HiveConf . getVar ( org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . hconf , HiveConf . ConfVars . STAGINGDIR ) ) ; } } ; org . apache . hadoop . fs . FileStatus [ ] statuses = fs . listStatus ( path , filter ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { org . apache . hadoop . hive . ql . parse . TestReplicationScenarios . LOG . error ( ( "Failed<sp>to<sp>list<sp>files<sp>in:<sp>" + warehouse ) , e ) ; assert false ; } } listStatus ( org . apache . hadoop . mapred . JobConf , org . apache . hadoop . fs . Path ) { java . util . ArrayList < org . apache . hadoop . fs . FileStatus > result = new java . util . ArrayList < org . apache . hadoop . fs . FileStatus > ( ) ; java . util . List < java . io . IOException > errors = new java . util . ArrayList < java . io . IOException > ( ) ; org . apache . hadoop . fs . FileSystem fs = dir . getFileSystem ( job ) ; org . apache . hadoop . fs . FileStatus [ ] matches = fs . globStatus ( dir , FileUtils . HIDDEN_FILES_PATH_FILTER ) ; if ( matches == null ) { errors . add ( new java . io . IOException ( ( "Input<sp>path<sp>does<sp>not<sp>exist:<sp>" + dir ) ) ) ; } else if ( ( matches . length ) == 0 ) { errors . add ( new java . io . IOException ( ( ( "Input<sp>Pattern<sp>" + dir ) + "<sp>matches<sp>0<sp>files" ) ) ) ; } else { for ( org . apache . hadoop . fs . FileStatus globStat : matches ) { org . apache . hadoop . hive . common . FileUtils . listStatusRecursively ( fs , globStat , result ) ; } } if ( ! ( errors . isEmpty
org . junit . Assert . assertEquals ( 0 , statuses . length )
testSerializeWhenEmpty ( ) { org . eclipse . rap . rwt . internal . serverpush . ServerPushActivationTracker deserializedTracker = serializeAndDeserialize ( serverPushActivationTracker ) ; "<AssertPlaceHolder>" ; } isActive ( ) { return this . equals ( editor . getActivePageInstance ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( serverPushActivationTracker . isActive ( ) ) == ( deserializedTracker . isActive ( ) ) ) )
testFileTsFileKs ( ) { com . cloudhopper . commons . ssl . SslConfiguration cf = new com . cloudhopper . commons . ssl . SslConfiguration ( ) ; cf . setKeyStorePath ( "src/test/resources/keystore" ) ; cf . setKeyStorePassword ( "changeit" ) ; cf . setKeyManagerPassword ( "changeit" ) ; cf . setTrustStorePath ( "src/test/resources/keystore" ) ; cf . setTrustStorePassword ( "changeit" ) ; com . cloudhopper . commons . ssl . SslContextFactory factory = new com . cloudhopper . commons . ssl . SslContextFactory ( cf ) ; "<AssertPlaceHolder>" ; } getSslContext ( ) { return sslContext ; }
org . junit . Assert . assertTrue ( ( ( factory . getSslContext ( ) ) != null ) )
readTokenSkipSpaces ( ) { victim = new org . sejda . sambox . input . SourceReader ( inMemorySeekableSourceFrom ( "10<sp>0<sp>obj<sp><</key<sp>value>>" . getBytes ( ) ) ) ; victim . position ( 15 ) ; "<AssertPlaceHolder>" ; } readToken ( ) { skipSpaces ( ) ; java . lang . StringBuilder builder = pool . borrow ( ) ; try { int c ; while ( ( ( c = source . read ( ) ) != ( - 1 ) ) && ( ! ( isEndOfName ( c ) ) ) ) { builder . append ( ( ( char ) ( c ) ) ) ; } unreadIfValid ( c ) ; return builder . toString ( ) ; } finally { pool . give ( builder ) ; } }
org . junit . Assert . assertEquals ( "value" , victim . readToken ( ) )
jsonAPI_01 ( ) { org . apache . jena . atlas . json . JsonObject obj = org . apache . jena . atlas . json . JSON . parse ( "{<sp>key1:<sp>'str1'<sp>,<sp>key2:<sp>[<sp>1<sp>,<sp>2<sp>]<sp>}" ) ; "<AssertPlaceHolder>" ; } size ( ) { checkRead ( ) ; return holder . getBaseItem ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , obj . size ( ) )
testValidateResourceWithValuesetExpansionGood ( ) { org . hl7 . fhir . dstu3 . model . Patient patient = new org . hl7 . fhir . dstu3 . model . Patient ( ) ; patient . addIdentifier ( ) . setSystem ( "http://system" ) . setValue ( "12345" ) . getType ( ) . addCoding ( ) . setSystem ( "http://hl7.org/fhir/v2/0203" ) . setCode ( "MR" ) ; ca . uhn . fhir . validation . ValidationResult output = myVal . validateWithResult ( patient ) ; java . util . List < ca . uhn . fhir . validation . SingleValidationMessage > all = logResultsAndReturnAll ( output ) ; "<AssertPlaceHolder>" ; } size ( ) { return myTagSet . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , all . size ( ) )
test02RotateZeroVector ( ) { final com . jogamp . opengl . math . Quaternion quat = new com . jogamp . opengl . math . Quaternion ( ) ; final float [ ] rotVec0 = quat . rotateVector ( new float [ 3 ] , 0 , com . jogamp . opengl . test . junit . jogl . math . TestQuaternion01NOUI . ZERO , 0 ) ; "<AssertPlaceHolder>" ; } rotateVector ( float [ ] , int , float [ ] , int ) { if ( com . jogamp . opengl . math . VectorUtil . isVec3Zero ( vecIn , vecInOffset , FloatUtil . EPSILON ) ) { vecOut [ ( 0 + vecOutOffset ) ] = 0.0F ; vecOut [ ( 1 + vecOutOffset ) ] = 0.0F ; vecOut [ ( 2 + vecOutOffset ) ] = 0.0F ; } else { final float vecX = vecIn [ ( 0 + vecInOffset ) ] ; final float vecY = vecIn [ ( 1 + vecInOffset ) ] ; final float vecZ = vecIn [ ( 2 + vecInOffset ) ] ; final float x_x = ( x ) * ( x ) ; final float y_y = ( y ) * ( y ) ; final float z_z = ( z ) * ( z ) ; final float w_w = ( w ) * ( w ) ; vecOut [ ( 0 + vecOutOffset ) ] = ( ( ( ( w_w * vecX ) + ( x_x * vecX ) ) - ( z_z * vecX ) ) - ( y_y * vecX ) ) + ( 2.0F * ( ( ( ( ( ( y ) * ( w ) ) * vecZ ) - ( ( ( z ) * ( w ) ) * vecY ) ) + ( ( ( y ) * ( x ) ) * vecY ) ) + ( ( ( z ) * ( x ) ) * vecZ ) ) ) ; vecOut [ ( 1 + vecOutOffset ) ] = ( ( ( ( y_y * vecY ) - ( z_z * vecY ) ) + ( w_w * vecY ) ) - ( x_x * vecY ) ) + ( 2.0F * ( ( ( ( ( ( x ) * ( y ) ) * vecX ) + ( ( ( z ) * ( y ) ) * vecZ ) ) + ( ( ( w ) * ( z ) ) * vecX ) ) - ( ( ( x ) * ( w ) ) * vecZ ) ) ) ; vecOut [ ( 2 + vecOutOffset ) ] = ( ( ( ( z_z * vecZ ) - ( y_y * vecZ ) ) - ( x_x * vecZ ) ) + ( w_w * vecZ ) ) + ( 2.0F * ( ( ( ( ( ( x ) * ( z ) ) * vecX ) + ( ( ( y ) * ( z ) ) * vecY ) ) - ( ( ( w ) * ( y ) ) * vecX ) ) + ( ( ( w ) * ( x ) ) * vecY ) ) ) ; } return vecOut ; }
org . junit . Assert . assertArrayEquals ( com . jogamp . opengl . test . junit . jogl . math . TestQuaternion01NOUI . ZERO , rotVec0 , FloatUtil . EPSILON )
testAppRun ( ) { shared . kripton47 . BindApp47SharedPreferences shared = shared . kripton47 . BindApp47SharedPreferences . getInstance ( ) ; shared . edit ( ) . putName ( "hello" ) . commit ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return prefs . getString ( "name" , defaultBean . name ) ; }
org . junit . Assert . assertTrue ( shared . getName ( ) . equals ( "hello" ) )
shouldThrowException ( ) { org . neo4j . codegen . ClassHandle handle ; try ( org . neo4j . codegen . ClassGenerator simple = generateClass ( "SimpleClass" ) ) { try ( org . neo4j . codegen . CodeBlock thrower = simple . generateMethod ( void . class , "thrower" ) ) { thrower . throwException ( org . neo4j . codegen . Expression . invoke ( org . neo4j . codegen . Expression . newInstance ( org . neo4j . codegen . RuntimeException . class ) , org . neo4j . codegen . MethodReference . constructorReference ( org . neo4j . codegen . RuntimeException . class , java . lang . String . class ) , org . neo4j . codegen . Expression . constant ( "hello<sp>world" ) ) ) ; } handle = simple . handle ( ) ; } try { org . neo4j . codegen . CodeGenerationTest . instanceMethod ( handle . newInstance ( ) , "thrower" ) . invoke ( ) ; org . junit . Assert . fail ( "expected<sp>exception" ) ; } catch ( java . lang . RuntimeException exception ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( "hello<sp>world" , exception . getMessage ( ) )
notNullArg ( ) { org . pdfsam . ui . io . RemovePdfVersionConstraintEvent victim = new org . pdfsam . ui . io . RemovePdfVersionConstraintEvent ( org . sejda . model . pdf . PdfVersion . VERSION_1_3 ) ; "<AssertPlaceHolder>" ; } getPdfVersion ( ) { return pdfVersion ; }
org . junit . Assert . assertEquals ( PdfVersion . VERSION_1_3 , victim . getPdfVersion ( ) )
sliceWithJustColonExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Sequence ( Property ( "foo" ) , Slice ( null , null , 1 ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "foo[:]" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
word_markdown ( ) { java . util . List < java . lang . String > actual = SplitStrategy . WORD . split ( "Java<sp>is<sp>a<sp>general-purpose<sp>computer<sp>programming<sp>language<sp>that<sp>is<sp>concurrent,<sp>class-based,<sp>object-oriented,<sp>and<sp>specifically<sp>designed<sp>to<sp>have<sp>**as<sp>few<sp>implementation<sp>dependencies<sp>as<sp>possible**." , 100 ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "Java<sp>is<sp>a<sp>general-purpose<sp>computer<sp>programming<sp>language<sp>that<sp>is<sp>concurrent,<sp>class-based,<sp>..." , "object-oriented,<sp>and<sp>specifically<sp>designed<sp>to<sp>have<sp>..." , "**as<sp>few<sp>implementation<sp>dependencies<sp>as<sp>possible**." ) ; "<AssertPlaceHolder>" ; } split ( java . lang . String , int ) { if ( ( maxLength < 1 ) || ( ( message . length ( ) ) <= maxLength ) ) { return java . util . Arrays . asList ( message ) ; } return _split ( message , maxLength ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetNode ( ) { final java . lang . String pid = getRandomUniqueId ( ) ; createObject ( pid ) ; final org . apache . http . client . methods . HttpGet method = new org . apache . http . client . methods . HttpGet ( ( ( serverAddress ) + pid ) ) ; method . addHeader ( javax . ws . rs . core . HttpHeaders . ACCEPT , "text/html" ) ; "<AssertPlaceHolder>" ; } getStatus ( org . apache . http . client . methods . HttpUriRequest ) { final org . apache . http . HttpResponse response = execute ( method ) ; final int result = response . getStatusLine ( ) . getStatusCode ( ) ; if ( ( ! ( result > 199 ) ) || ( ! ( result < 400 ) ) ) { logger . warn ( org . apache . http . util . EntityUtils . toString ( response . getEntity ( ) ) ) ; } return result ; }
org . junit . Assert . assertEquals ( 200 , getStatus ( method ) )
testHasMore ( ) { for ( int i = 1 ; i <= 100 ; i ++ ) { "<AssertPlaceHolder>" ; } } hasMore ( ) { return ( value ) < ( high ) ; }
org . junit . Assert . assertEquals ( true , range . hasMore ( ) )
isJaxRsAwareShouldReturnTrueAsAvailableInTestClassPath ( ) { "<AssertPlaceHolder>" ; } isJaxRsAware ( ) { return org . codegist . common . reflect . Classes . isClassKnown ( "javax.ws.rs.GET" , org . codegist . crest . config . annotate . jaxrs . JaxRsAnnotations . class . getClassLoader ( ) ) ; }
org . junit . Assert . assertTrue ( org . codegist . crest . config . annotate . jaxrs . JaxRsAnnotations . isJaxRsAware ( ) )
testComplexMapConverter ( ) { com . owlike . genson . functional . Map < com . owlike . genson . functional . UUID , com . owlike . genson . functional . List < com . owlike . genson . functional . UUID > > expected = new com . owlike . genson . functional . HashMap < com . owlike . genson . functional . UUID , com . owlike . genson . functional . List < com . owlike . genson . functional . UUID > > ( ) ; expected . put ( com . owlike . genson . functional . UUID . randomUUID ( ) , com . owlike . genson . functional . Arrays . asList ( com . owlike . genson . functional . UUID . randomUUID ( ) , com . owlike . genson . functional . UUID . randomUUID ( ) ) ) ; expected . put ( com . owlike . genson . functional . UUID . randomUUID ( ) , com . owlike . genson . functional . Arrays . asList ( com . owlike . genson . functional . UUID . randomUUID ( ) ) ) ; expected . put ( null , null ) ; java . lang . String json = genson . serialize ( expected , new com . owlike . genson . functional . GenericType < com . owlike . genson . functional . Map < com . owlike . genson . functional . UUID , com . owlike . genson . functional . List < com . owlike . genson . functional . UUID > > > ( ) { } ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . String , com . owlike . genson . GenericType , com . owlike . genson . Class [ ] ) { com . owlike . genson . StringReader reader = new com . owlike . genson . StringReader ( fromSource ) ; return deserialize ( toType , createReader ( reader ) , new com . owlike . genson . Context ( this , com . owlike . genson . Arrays . asList ( withViews ) ) ) ; }
org . junit . Assert . assertEquals ( expected , genson . deserialize ( json , new com . owlike . genson . functional . GenericType < com . owlike . genson . functional . Map < com . owlike . genson . functional . UUID , com . owlike . genson . functional . List < com . owlike . genson . functional . UUID > > > ( ) { } ) )
determine_if_number_is_prime_java ( ) { boolean isPrimeNumber = isPrime ( 5779 ) ; "<AssertPlaceHolder>" ; } isPrime ( int ) { if ( ( n % 2 ) == 0 ) { return false ; } else { for ( int i = 3 ; ( i * i ) <= n ; i += 2 ) { if ( ( n % i ) == 0 ) { return false ; } } } return true ; }
org . junit . Assert . assertTrue ( isPrimeNumber )
testPosition ( ) { for ( int i = 0 ; i < ( bytes . capacity ( ) ) ; i ++ ) bytes . write ( i ) ; for ( int i = ( ( int ) ( ( bytes . capacity ( ) ) - 1 ) ) ; i >= 0 ; i -- ) { bytes . position ( i ) ; "<AssertPlaceHolder>" ; } } read ( ) { return bytes . read ( ) ; }
org . junit . Assert . assertEquals ( ( ( byte ) ( i ) ) , bytes . read ( ) )
testTrafficActionSerializer ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . flowspec . rev180329 . bgp . rib . route . attributes . extended . communities . extended . community . TrafficActionExtendedCommunityCase trafficAction = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . flowspec . rev180329 . bgp . rib . route . attributes . extended . communities . extended . community . TrafficActionExtendedCommunityCaseBuilder ( ) . setTrafficActionExtendedCommunity ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . flowspec . rev180329 . traffic . action . extended . community . TrafficActionExtendedCommunityBuilder ( ) . setSample ( true ) . setTerminalAction ( true ) . build ( ) ) . build ( ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . message . rev180329 . path . attributes . attributes . ExtendedCommunities expected = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . message . rev180329 . path . attributes . attributes . ExtendedCommunitiesBuilder ( ) . setExtendedCommunity ( trafficAction ) . setTransitive ( true ) . build ( ) ; final io . netty . buffer . ByteBuf output = io . netty . buffer . Unpooled . buffer ( org . opendaylight . protocol . bgp . flowspec . extended . communities . FSExtendedCommunitiesTest . TRAFFIC_ACTION . length ) ; this . registry . serializeExtendedCommunity ( expected , output ) ; "<AssertPlaceHolder>" ; } array ( ) { return this . backingArray . clone ( ) ; }
org . junit . Assert . assertArrayEquals ( org . opendaylight . protocol . bgp . flowspec . extended . communities . FSExtendedCommunitiesTest . TRAFFIC_ACTION , output . array ( ) )
testWrite ( ) { final com . amazonaws . services . sqs . AmazonSQS client = embeddedSqsRestServer . getClient ( ) ; final java . lang . String queueUrl = embeddedSqsRestServer . getQueueUrl ( ) ; java . util . List < com . amazonaws . services . sqs . model . SendMessageRequest > messages = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { final com . amazonaws . services . sqs . model . SendMessageRequest request = new com . amazonaws . services . sqs . model . SendMessageRequest ( queueUrl , ( "This<sp>is<sp>a<sp>test<sp>" + i ) ) ; messages . add ( request ) ; } pipeline . apply ( org . apache . beam . sdk . transforms . Create . of ( messages ) ) . apply ( org . apache . beam . sdk . io . aws . sqs . SqsIO . write ( ) ) ; pipeline . run ( ) . waitUntilFinish ( ) ; java . util . List < java . lang . String > received = new java . util . ArrayList ( ) ; while ( ( received . size ( ) ) < 100 ) { final com . amazonaws . services . sqs . model . ReceiveMessageResult receiveMessageResult = client . receiveMessage ( queueUrl ) ; if ( ( receiveMessageResult . getMessages ( ) ) != null ) { for ( com . amazonaws . services . sqs . model . Message message : receiveMessageResult . getMessages ( ) ) { received . add ( message . getBody ( ) ) ; } } } "<AssertPlaceHolder>" ; for ( int i = 0 ; i < 100 ; i ++ ) { received . contains ( ( "This<sp>is<sp>a<sp>test<sp>" + i ) ) ; } } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 100 , received . size ( ) )
updateUsers ( ) { org . oscm . app . v2_0 . data . InstanceStatus status = updateUsers ( "123" , null ) ; "<AssertPlaceHolder>" ; } updateUsers ( org . oscm . domobjects . Subscription , java . util . List ) { if ( ! ( isProductUserManagementActive ( subscription ) ) ) { return ; } if ( ( usageLicenses == null ) || ( usageLicenses . isEmpty ( ) ) ) { return ; } try { org . oscm . provisioning . data . BaseResult result = getPort ( subscription ) . updateUsers ( subscription . getProductInstanceId ( ) , toUserList ( usageLicenses ) , getCurrentUser ( ) ) ; verifyResult ( subscription , result ) ; } catch ( org . oscm . internal . types . exception . TechnicalServiceOperationException e ) { throw e ; } catch ( org . oscm . internal . types . exception . TechnicalServiceNotAliveException e ) { throw e ; } catch ( javax . xml . ws . WebServiceException e ) { if ( isTimeoutOccured ( e ) ) { throw convertThrowableTimeout ( subscription , e ) ; } throw convertWebServiceException ( subscription , e ) ; } catch ( java . lang . Throwable e ) { throw convertThrowable ( e ) ; } }
org . junit . Assert . assertNull ( status )
whenValidationWithValidConstructorParameters_thenZeroVoilations ( ) { java . lang . reflect . Constructor < org . baeldung . javaxval . methodvalidation . model . Customer > constructor = org . baeldung . javaxval . methodvalidation . model . Customer . class . getConstructor ( java . lang . String . class , java . lang . String . class ) ; java . lang . Object [ ] parameterValues = new java . lang . Object [ ] { "William" , "Smith" } ; java . util . Set < javax . validation . ConstraintViolation < org . baeldung . javaxval . methodvalidation . model . Customer > > violations = executableValidator . validateConstructorParameters ( constructor , parameterValues ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , violations . size ( ) )
test_createdTimestamp_Timestamp ( ) { io . ebeaninternal . server . deploy . meta . DeployBeanProperty prop = new io . ebeaninternal . server . deploy . meta . DeployBeanProperty ( null , java . sql . Timestamp . class , null , null ) ; io . ebeaninternal . server . deploy . generatedproperty . GeneratedProperty insertTimestamp = factory . createInsertTimestamp ( prop ) ; java . lang . Object value = insertTimestamp . getInsertValue ( null , null , java . lang . System . currentTimeMillis ( ) ) ; "<AssertPlaceHolder>" ; } getInsertValue ( io . ebeaninternal . server . deploy . BeanProperty , io . ebean . bean . EntityBean , long ) { return new java . sql . Timestamp ( now ) ; }
org . junit . Assert . assertTrue ( ( value instanceof java . sql . Timestamp ) )
shouldUseAlias ( ) { java . lang . String expectedResult = "<customOrder>\n<sp><price>15.0</price>\n<sp><comments>pack<sp>it<sp>nicely,<sp>please</comments>\n</customOrder>" ; br . com . caelum . vraptor . serialization . xstream . XStreamXMLSerializationTest . Order order = new br . com . caelum . vraptor . serialization . xstream . XStreamXMLSerializationTest . Order ( new br . com . caelum . vraptor . serialization . xstream . XStreamXMLSerializationTest . Client ( "guilherme<sp>silveira" ) , 15.0 , "pack<sp>it<sp>nicely,<sp>please" ) ; serialization . from ( order , "customOrder" ) . serialize ( ) ; "<AssertPlaceHolder>" ; } result ( ) { return new java . lang . String ( stream . toByteArray ( ) ) ; }
org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) )