input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
order_comparator ( ) { java . util . List < com . asakusafw . testdriver . loader . MockDataModel > list = com . asakusafw . testdriver . loader . BasicDataLoaderTest . loader ( new com . asakusafw . testdriver . loader . MockDataModel ( 5 , "A" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 2 , "B" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 1 , "C" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 3 , "D" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 4 , "E" ) ) . order ( java . util . Comparator . comparing ( MockDataModel :: getKeyOption ) ) . asList ( ) ; "<AssertPlaceHolder>" ; } asList ( ) { return asStream ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertThat ( list , contains ( new com . asakusafw . testdriver . loader . MockDataModel ( 1 , "C" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 2 , "B" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 3 , "D" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 4 , "E" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 5 , "A" ) ) )
onConnectionLostMapsUnexpectedConnectCodeException ( ) { new tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . NonStrictExpectations ( ) { { mockedMqttException . getReasonCode ( ) ; result = org . eclipse . paho . client . mqttv3 . MqttException . REASON_CODE_UNEXPECTED_ERROR ; } } ; java . lang . Exception e = tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . PahoExceptionTranslator . convertToMqttException ( new org . eclipse . paho . client . mqttv3 . MqttException ( org . eclipse . paho . client . mqttv3 . MqttException . REASON_CODE_UNEXPECTED_ERROR ) , "" ) ; "<AssertPlaceHolder>" ; } convertToMqttException ( org . eclipse . paho . client . mqttv3 . MqttException , java . lang . String ) { switch ( pahoException . getReasonCode ( ) ) { case REASON_CODE_CLIENT_EXCEPTION : if ( ( ( ( ( ( pahoException . getCause ( ) ) instanceof java . net . UnknownHostException ) || ( ( pahoException . getCause ( ) ) instanceof java . net . NoRouteToHostException ) ) || ( ( pahoException . getCause ( ) ) instanceof java . lang . InterruptedException ) ) || ( ( pahoException . getCause ( ) ) instanceof java . net . SocketTimeoutException ) ) || ( ( pahoException . getCause ( ) ) instanceof java . net . SocketException ) ) { com . microsoft . azure . sdk . iot . device . exceptions . ProtocolException connectionException = new com . microsoft . azure . sdk . iot . device . exceptions . ProtocolException ( errorMessage , pahoException ) ; connectionException . setRetryable ( true ) ; return connectionException ; } else { return new com . microsoft . azure . sdk . iot . device . exceptions . ProtocolException ( errorMessage , pahoException ) ; } case REASON_CODE_INVALID_PROTOCOL_VERSION : return new com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttRejectedProtocolVersionException ( errorMessage , pahoException ) ; case REASON_CODE_INVALID_CLIENT_ID : return new com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttIdentifierRejectedException ( errorMessage , pahoException ) ; case REASON_CODE_BROKER_UNAVAILABLE : return new com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttServerUnavailableException ( errorMessage , pahoException ) ; case REASON_CODE_FAILED_AUTHENTICATION : return new com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttBadUsernameOrPasswordException ( errorMessage , pahoException ) ; case REASON_CODE_NOT_AUTHORIZED : return new com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttUnauthorizedException ( errorMessage , pahoException ) ; case REASON_CODE_SUBSCRIBE_FAILED : case REASON_CODE_CLIENT_NOT_CONNECTED : case REASON_CODE_TOKEN_INUSE : case REASON_CODE_CONNECTION_LOST : case REASON_CODE_SERVER_CONNECT_ERROR : case REASON_CODE_CLIENT_TIMEOUT : case REASON_CODE_WRITE_TIMEOUT : case REASON_CODE_MAX_INFLIGHT : case REASON_CODE_CONNECT_IN_PROGRESS : com . microsoft . azure . sdk . iot . device . exceptions . ProtocolException connectionException = new com . microsoft . azure . sdk . iot . device . exceptions . ProtocolException ( errorMessage , pahoException ) ; connectionException . setRetryable ( true ) ; return connectionException ; default : if ( ( ( pahoException . getReasonCode ( ) ) >= ( com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . PahoExceptionTranslator . UNDEFINED_MQTT_CONNECT_CODE_LOWER_BOUND ) ) && ( ( pahoException . getReasonCode ( ) ) <= ( com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . PahoExceptionTranslator . UNDEFINED_MQTT_CONNECT_CODE_UPPER_BOUND ) ) ) { return new com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttUnexpectedErrorException ( errorMessage , pahoException ) ; } else { return new com . microsoft . azure . sdk . iot . device . exceptions . ProtocolException ( errorMessage , pahoException ) ; } } }
org . junit . Assert . assertTrue ( ( e instanceof tests . unit . com . microsoft . azure . sdk . iot . device . transport . mqtt . exceptions . MqttUnexpectedErrorException ) )
testParent ( ) { "<AssertPlaceHolder>" ; try { new org . eclipse . swt . widgets . TreeColumn ( null , org . eclipse . swt . SWT . NONE ) ; org . junit . Assert . fail ( "Must<sp>not<sp>allow<sp>to<sp>create<sp>TreeColumn<sp>withh<sp>null-parent." ) ; } catch ( java . lang . IllegalArgumentException iae ) { } } getParent ( ) { return parent ; }
org . junit . Assert . assertSame ( tree , column . getParent ( ) )
typedObjectFromFloatAndBigint ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "bigint" ) ; java . lang . Float jsonValue = 1234.56F ; java . lang . Long expected = 1234L ; java . lang . Object result = com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndField ( jsonValue , field ) ; "<AssertPlaceHolder>" ; } typedObjectFromValueAndField ( java . lang . Object , com . pardot . rhombus . cobject . CField ) { try { return com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndFieldType ( jsonValue , field . getType ( ) ) ; } catch ( java . lang . IllegalArgumentException e ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( ( ( "Field<sp>" + ( field . getName ( ) ) ) + ":<sp>Unable<sp>to<sp>convert<sp>" ) + jsonValue ) + "<sp>of<sp>type<sp>" ) + ( jsonValue . getClass ( ) ) ) + "<sp>to<sp>C*<sp>type<sp>" ) + ( field . getType ( ) . toString ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( expected , result )
singleTouch ( ) { final int eventCount = 1000 ; org . os890 . ds . addon . test . uc004 . CountingEvent event = new org . os890 . ds . addon . test . uc004 . CountingEvent ( ) ; for ( int i = 0 ; i < eventCount ; i ++ ) { this . simpleDispatcher . singleTouch ( event ) ; } java . lang . Thread . sleep ( 50 ) ; "<AssertPlaceHolder>" ; } getTouchCount ( ) { return touchCount . get ( ) ; }
org . junit . Assert . assertEquals ( eventCount , event . getTouchCount ( ) )
testKeysOfDifferentClasses ( ) { org . jfree . chart . PaintMap m = new org . jfree . chart . PaintMap ( ) ; m . put ( "ABC" , Color . RED ) ; m . put ( 99 , Color . BLUE ) ; "<AssertPlaceHolder>" ; } getPaint ( java . lang . Comparable ) { org . jfree . chart . util . ParamChecks . nullNotPermitted ( key , "key" ) ; return this . store . get ( key ) ; }
org . junit . Assert . assertEquals ( Color . BLUE , m . getPaint ( 99 ) )
testBuildWithParameters ( ) { java . lang . String abbrName = "abbrName" ; java . lang . String name = "name" ; java . lang . Double markMin = 0.0 ; java . lang . Double markMax = 10.0 ; org . lnu . is . domain . mark . scale . type . MarkScaleType markScaleType = new org . lnu . is . domain . mark . scale . type . MarkScaleType ( ) ; markScaleType . setId ( 1L ) ; org . lnu . is . domain . mark . scale . MarkScale context = new org . lnu . is . domain . mark . scale . MarkScale ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; context . setMarkMin ( markMin ) ; context . setMarkMax ( markMax ) ; context . setMarkScaleType ( markScaleType ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>MarkScale<sp>e<sp>WHERE<sp>(<sp>e.markScaleType<sp>=<sp>:markScaleType<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>AND<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.markMin<sp>=<sp>:markMin<sp>AND<sp>e.markMax<sp>=<sp>:markMax<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . mark . scale . MarkScale > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
testFault ( ) { com . example . customerservice . GetCustomersByName request = new com . example . customerservice . GetCustomersByName ( ) ; request . setName ( "none" ) ; try { customerServiceProxy . getCustomersByName ( request ) ; org . junit . Assert . fail ( "NoSuchCustomerException<sp>expected" ) ; } catch ( com . example . customerservice . NoSuchCustomerException e ) { com . example . customerservice . NoSuchCustomer info = e . getFaultInfo ( ) ; "<AssertPlaceHolder>" ; } } getCustomerId ( ) { return customerId ; }
org . junit . Assert . assertEquals ( "none" , info . getCustomerId ( ) )
testDtp ( ) { net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB expected = new net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB ( "hello8" ) ; net . openhft . chronicle . wire . Marshallable actual = net . openhft . chronicle . wire . Marshallable . fromString ( ( "!net.openhft.chronicle.wire.InvalidYamWithCommonMistakesTest$DtoB<sp>" + ( ( "{\n" + "<sp>y:hello8\n" ) + "}\n" ) ) ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . CharSequence ) { return net . openhft . chronicle . wire . WireType . TEXT . fromString ( cs ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetFullTopLeftPoint ( ) { sh1 . setPosition ( 10.0 , 20.0 ) ; sh1 . setWidth ( 11.0 ) ; shape . addShape ( sh1 ) ; "<AssertPlaceHolder>" ; } getFullTopLeftPoint ( ) { final double gap = getBorderGap ( ) ; final net . sf . latexdraw . model . api . shape . Point tl = getTopLeftPoint ( ) ; tl . translate ( ( - gap ) , ( - gap ) ) ; return tl ; }
org . junit . Assert . assertEquals ( sh1 . getFullTopLeftPoint ( ) , shape . getFullTopLeftPoint ( ) )
testGetAllDrugInfo_shouldReturnUnretiredDrugInfo ( ) { java . util . List < org . raxa . module . raxacore . DrugInfo > allDrugInfo = s . getAllDrugInfo ( false ) ; "<AssertPlaceHolder>" ; } getAllDrugInfo ( boolean ) { org . hibernate . Criteria criteria = sessionFactory . getCurrentSession ( ) . createCriteria ( org . raxa . module . raxacore . DrugInfo . class ) ; if ( includeRetired == false ) { criteria . add ( org . hibernate . criterion . Restrictions . eq ( "retired" , false ) ) ; } return criteria . list ( ) ; }
org . junit . Assert . assertEquals ( allDrugInfo . size ( ) , 2 )
testNoImplementation ( ) { java . util . Map < ? , ? > s1 = org . hawkular . apm . api . services . ServiceResolver . getSingletonService ( java . util . Map . class ) ; "<AssertPlaceHolder>" ; } getSingletonService ( java . lang . Class ) { T ret = null ; synchronized ( org . hawkular . apm . api . services . ServiceResolver . singletons ) { if ( org . hawkular . apm . api . services . ServiceResolver . singletons . containsKey ( intf ) ) { ret = ( ( T ) ( org . hawkular . apm . api . services . ServiceResolver . singletons . get ( intf ) ) ) ; } else { java . util . List < T > services = org . hawkular . apm . api . services . ServiceResolver . getServices ( intf ) ; if ( ! ( services . isEmpty ( ) ) ) { ret = services . get ( 0 ) ; } org . hawkular . apm . api . services . ServiceResolver . singletons . put ( intf , ret ) ; } } return ret ; }
org . junit . Assert . assertNull ( s1 )
assertGetQueryTimeoutWithRoutedStatements ( ) { for ( java . sql . Statement each : statements . values ( ) ) { each . executeQuery ( sql ) ; "<AssertPlaceHolder>" ; } } getQueryTimeout ( ) { return getRoutedStatements ( ) . isEmpty ( ) ? 0 : getRoutedStatements ( ) . iterator ( ) . next ( ) . getQueryTimeout ( ) ; }
org . junit . Assert . assertThat ( each . getQueryTimeout ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
testNoServerNameConfig ( ) { append ( "[groups]" , globalPolicyFile ) ; append ( "other_group<sp>=<sp>malicious_role" , globalPolicyFile ) ; append ( "[roles]" , globalPolicyFile ) ; append ( "malicious_role<sp>=<sp>connector=c1->action=read,link=l1->action=read" , globalPolicyFile ) ; org . apache . sentry . policy . common . PolicyEngine policy = new org . apache . sentry . policy . sqoop . SqoopPolicyFileProviderBackend ( "server1" , globalPolicyFile . getPath ( ) ) ; com . google . common . collect . ImmutableSet < java . lang . String > permissions = policy . getAllPrivileges ( com . google . common . collect . Sets . newHashSet ( "other_group" ) , ActiveRoleSet . ALL ) ; "<AssertPlaceHolder>" ; } toString ( ) { return PolicyConstants . AUTHORIZABLE_JOINER . join ( parts ) ; }
org . junit . Assert . assertTrue ( permissions . toString ( ) , permissions . isEmpty ( ) )
should_not_filter_assembly_contigs_that_overlap_source_assembly_position ( ) { htsjdk . samtools . SAMRecord r = Read ( 0 , 100 , "100M200S" ) ; r . setAttribute ( "OA" , "polyA,150,+,200M100S,0,0" ) ; createInput ( r ) ; au . edu . wehi . idsv . AssemblyEvidenceSource aes = new au . edu . wehi . idsv . AssemblyEvidenceSource ( getCommandlineContext ( ) , com . google . common . collect . ImmutableList . of ( SES ( 10 , 10 ) ) , input ) ; java . util . ArrayList < au . edu . wehi . idsv . DirectedEvidence > result = com . google . common . collect . Lists . newArrayList ( aes . iterator ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
isAllowed_hasOnlyWan_WanAllowedByUserButNotConfig_policyIsFalse ( ) { setupConnectivity ( true , false , true ) ; when ( mockConfig . optBoolean ( "allowWANEventDelivery" , true ) ) . thenReturn ( false ) ; com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . delivery . policy . ConnectivityPolicy target = new com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . delivery . policy . ConnectivityPolicy ( mockContext , true ) ; "<AssertPlaceHolder>" ; } isAllowed ( ) { boolean allowed = false ; boolean canTrasmitOnWAN = ( context . getConfiguration ( ) . optBoolean ( com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . delivery . policy . ConnectivityPolicy . ALLOW_WAN_KEY , com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . delivery . policy . ConnectivityPolicy . ALLOW_WAN_DEFAULT ) ) && ( isWanAllowed ) ; if ( connectivity . isConnected ( ) ) { allowed = ( ( connectivity . hasWifi ( ) ) || ( connectivity . hasWired ( ) ) ) || ( ( connectivity . hasWAN ( ) ) && canTrasmitOnWAN ) ; } return allowed ; }
org . junit . Assert . assertThat ( target . isAllowed ( ) , org . hamcrest . Matchers . is ( false ) )
testSetConfigurationValue ( ) { java . lang . String expectedConfigurationValue = "test" ; this . algorithm . setStringConfigurationValue ( pathIdentifier , expectedConfigurationValue , expectedConfigurationValue ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expectedConfigurationValue , this . algorithm . path )
testGetSecUserRolesByRoleName ( ) { java . lang . String roleName1 = "alpha" ; java . lang . String roleName2 = "bravo" ; java . lang . String providerNo1 = "111" ; java . lang . String providerNo2 = "222" ; org . oscarehr . PMmodule . model . SecUserRole sUR1 = new org . oscarehr . PMmodule . model . SecUserRole ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( sUR1 ) ; sUR1 . setRoleName ( roleName1 ) ; sUR1 . setProviderNo ( providerNo1 ) ; dao . save ( sUR1 ) ; org . oscarehr . PMmodule . model . SecUserRole sUR2 = new org . oscarehr . PMmodule . model . SecUserRole ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( sUR2 ) ; sUR2 . setRoleName ( roleName2 ) ; sUR2 . setProviderNo ( providerNo2 ) ; dao . save ( sUR2 ) ; org . oscarehr . PMmodule . model . SecUserRole sUR3 = new org . oscarehr . PMmodule . model . SecUserRole ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( sUR3 ) ; sUR3 . setRoleName ( roleName1 ) ; sUR3 . setProviderNo ( providerNo1 ) ; dao . save ( sUR3 ) ; org . oscarehr . PMmodule . model . SecUserRole sUR4 = new org . oscarehr . PMmodule . model . SecUserRole ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( sUR4 ) ; sUR4 . setRoleName ( roleName1 ) ; sUR4 . setProviderNo ( providerNo1 ) ; dao . save ( sUR4 ) ; java . util . List < org . oscarehr . PMmodule . model . SecUserRole > expectedResult = new java . util . ArrayList < org . oscarehr . PMmodule . model . SecUserRole > ( java . util . Arrays . asList ( sUR1 , sUR3 , sUR4 ) ) ; java . util . List < org . oscarehr . PMmodule . model . SecUserRole > result = dao . getSecUserRolesByRoleName ( roleName1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
determineSegmentCount_override12 ( ) { int _segs = org . cache2k . core . InternalCache2kBuilder . determineSegmentCount ( false , 12 , true , 1000000 , 12 ) ; "<AssertPlaceHolder>" ; } determineSegmentCount ( boolean , int , boolean , long , int ) { int _segmentCount = 1 ; if ( _availableProcessors > 1 ) { _segmentCount = 2 ; if ( _boostConcurrency ) { _segmentCount = 2 << ( 31 - ( java . lang . Integer . numberOfLeadingZeros ( _availableProcessors ) ) ) ; } } if ( _segmentCountOverride > 0 ) { _segmentCount = 1 << ( 32 - ( java . lang . Integer . numberOfLeadingZeros ( ( _segmentCountOverride - 1 ) ) ) ) ; } else { int _maxSegments = _availableProcessors * 2 ; _segmentCount = java . lang . Math . min ( _segmentCount , _maxSegments ) ; } if ( ( _entryCapacity >= 0 ) && ( _entryCapacity < 1000 ) ) { _segmentCount = 1 ; } if ( _strictEviction ) { _segmentCount = 1 ; } return _segmentCount ; }
org . junit . Assert . assertEquals ( 16 , _segs )
testAcquireAndRelease ( ) { alluxio . underfs . SeekableUnderFileInputStream mockedStrem = mock ( alluxio . underfs . SeekableUnderFileInputStream . class ) ; when ( mUfs . openExistingFile ( eq ( alluxio . worker . block . UfsInputStreamManagerTest . FILE_NAME ) , any ( alluxio . underfs . options . OpenOptions . class ) ) ) . thenReturn ( mockedStrem ) . thenThrow ( new java . lang . IllegalStateException ( "Should<sp>only<sp>be<sp>called<sp>once" ) ) ; java . io . InputStream instream1 = mManager . acquire ( mUfs , alluxio . worker . block . UfsInputStreamManagerTest . FILE_NAME , alluxio . worker . block . UfsInputStreamManagerTest . FILE_ID , alluxio . underfs . options . OpenOptions . defaults ( ) . setOffset ( 2 ) ) ; mManager . release ( instream1 ) ; java . io . InputStream instream2 = mManager . acquire ( mUfs , alluxio . worker . block . UfsInputStreamManagerTest . FILE_NAME , alluxio . worker . block . UfsInputStreamManagerTest . FILE_ID , alluxio . underfs . options . OpenOptions . defaults ( ) . setOffset ( 4 ) ) ; "<AssertPlaceHolder>" ; verify ( mockedStrem ) . seek ( 4 ) ; } setOffset ( long ) { bitField0_ |= 4 ; offset_ = value ; onChanged ( ) ; return this ; }
org . junit . Assert . assertEquals ( instream1 , instream2 )
testAppliesToSubscription_Included ( ) { org . lilyproject . util . repo . RecordEvent . IndexRecordFilterData filterData = new org . lilyproject . util . repo . RecordEvent . IndexRecordFilterData ( ) ; filterData . setSubscriptionInclusions ( com . google . common . collect . ImmutableSet . of ( "to_include" ) ) ; "<AssertPlaceHolder>" ; } appliesToSubscription ( java . lang . String ) { if ( includeSubscriptions ) { return ( ( indexSubscriptionIds ) == null ) || ( indexSubscriptionIds . contains ( indexSubscriptionId ) ) ; } else { return ( ( indexSubscriptionIds ) != null ) && ( ! ( indexSubscriptionIds . contains ( indexSubscriptionId ) ) ) ; } }
org . junit . Assert . assertTrue ( filterData . appliesToSubscription ( "to_include" ) )
testGetPlatform ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "dynacor" , "Ubuntu" , "BeagleBone" } ; try { boolean foundMatch = false ; for ( java . lang . String possibility : expected ) { if ( org . eclipse . kura . core . system . test . SystemServiceTest . systemService . getPlatform ( ) . equals ( possibility ) ) { foundMatch = true ; break ; } } "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "getPlatform()<sp>failed:<sp>" + ( e . getMessage ( ) ) ) ) ; } } equals ( java . lang . Object ) { if ( ! ( obj instanceof com . codeminders . hidapi . HIDDevice ) ) return false ; return ( ( ( com . codeminders . hidapi . HIDDevice ) ( obj ) ) . peer ) == ( peer ) ; }
org . junit . Assert . assertTrue ( foundMatch )
testInOrder ( ) { udt . UDTInputStream is = new udt . UDTInputStream ( null ) ; is . setBlocking ( false ) ; byte [ ] data = getRandomData ( ( ( 10 * 1024 ) * 1024 ) ) ; byte [ ] [ ] blocks = makeChunks ( 10 , data ) ; java . lang . String digest = computeMD5 ( blocks ) ; for ( int i = 0 ; i < 10 ; i ++ ) { is . haveNewData ( ( i + 1 ) , blocks [ i ] ) ; } is . noMoreData ( ) ; java . lang . String readMD5 = readAll ( is , ( 1024 * 999 ) ) ; "<AssertPlaceHolder>" ; } readAll ( java . io . InputStream , int ) { java . security . MessageDigest d = java . security . MessageDigest . getInstance ( "MD5" ) ; int c = 0 ; byte [ ] buf = new byte [ bufsize ] ; while ( true ) { c = is . read ( buf ) ; if ( c == ( - 1 ) ) break ; else { d . update ( buf , 0 , c ) ; } } return udt . UDTTestBase . hexString ( d ) ; }
org . junit . Assert . assertEquals ( digest , readMD5 )
test1 ( ) { java . lang . String addr = "cd2a3d9f938e13cd947ec05abc7fe734df8dd826" ; org . ethereum . facade . Repository repository = new org . ethereum . db . RepositoryImpl ( ) ; try { org . ethereum . core . AccountState createdState = repository . createAccount ( org . spongycastle . util . encoders . Hex . decode ( addr ) ) ; org . ethereum . core . AccountState fetchedState = repository . getAccountState ( org . spongycastle . util . encoders . Hex . decode ( addr ) ) ; "<AssertPlaceHolder>" ; } finally { repository . close ( ) ; } } getEncoded ( ) { if ( ( rlpEncoded ) == null ) { int size = ( ( storageKeys ) == null ) ? 0 : storageKeys . size ( ) ; byte [ ] [ ] keys = new byte [ size ] [ ] ; byte [ ] [ ] values = new byte [ size ] [ ] ; for ( int i = 0 ; i < size ; ++ i ) { org . ethereum . vm . DataWord key = storageKeys . get ( i ) ; keys [ i ] = org . ethereum . util . RLP . encodeElement ( key . getData ( ) ) ; } for ( int i = 0 ; i < size ; ++ i ) { org . ethereum . vm . DataWord value = storageValues . get ( i ) ; values [ i ] = org . ethereum . util . RLP . encodeElement ( value . getNoLeadZeroesData ( ) ) ; } byte [ ] rlpKeysList = org . ethereum . util . RLP . encodeList ( keys ) ; byte [ ] rlpValuesList = org . ethereum . util . RLP . encodeList ( values ) ; byte [ ] rlpCode = org . ethereum . util . RLP . encodeElement ( code ) ; this . rlpEncoded = org . ethereum . util . RLP . encodeList ( rlpKeysList , rlpValuesList , rlpCode ) ; } return rlpEncoded ; }
org . junit . Assert . assertEquals ( createdState . getEncoded ( ) , fetchedState . getEncoded ( ) )
testParse_ExceedsMaximumIntegerDigitsDE ( ) { org . oscm . converter . PriceConverter converter = new org . oscm . converter . PriceConverter ( java . util . Locale . GERMAN ) ; "<AssertPlaceHolder>" ; converter . parse ( "111111111111111111111111111111111111111111111111113,001" ) ; } getActiveLocale ( ) { return activeLocale ; }
org . junit . Assert . assertEquals ( Locale . GERMAN , converter . getActiveLocale ( ) )
updateCodeSystemWithInvalidBranchPath ( ) { final java . lang . String shortName = "sn3" ; final java . lang . String oid = "oid3" ; createCodeSystem ( shortName , oid ) ; final com . b2international . snowowl . datastore . CodeSystemEntry oldCodeSystem = getCodeSystem ( shortName ) ; "<AssertPlaceHolder>" ; com . b2international . snowowl . terminologyregistry . core . request . CodeSystemRequests . prepareUpdateCodeSystem ( shortName ) . setBranchPath ( "non-existent-branch-path" ) . build ( com . b2international . snowowl . api . japi . codesystem . CodeSystemRequestTest . REPOSITORY_ID , com . b2international . snowowl . api . japi . codesystem . CodeSystemRequestTest . BRANCH , "system" , java . lang . String . format ( "Updated<sp>code<sp>system<sp>%s." , shortName ) ) . execute ( bus ) . getSync ( ) ; } getCodeSystem ( java . lang . String ) { final java . util . Set < java . lang . String > repositoryIds = getRepositoryIds ( ) ; for ( java . lang . String repoId : repositoryIds ) { com . b2international . snowowl . datastore . CodeSystemEntry codeSystemEntry = com . b2international . snowowl . terminologyregistry . core . request . CodeSystemRequests . prepareGetCodeSystem ( codeSystemShortName ) . build ( repoId ) . execute ( bus ) . getSync ( ) ; if ( codeSystemEntry != null ) { return codeSystemEntry ; } } throw new com . b2international . commons . exceptions . NotFoundException ( "Codesystem" , codeSystemShortName ) ; }
org . junit . Assert . assertNotNull ( oldCodeSystem )
ImmutableList_castToList ( ) { com . gs . collections . api . list . ImmutableList < java . lang . Integer > immutableList = this . newWith ( 3 , 3 , 3 , 2 , 2 , 1 ) ; java . util . List < java . lang . Integer > list = immutableList . castToList ( ) ; "<AssertPlaceHolder>" ; } castToList ( ) { return this ; }
org . junit . Assert . assertSame ( immutableList , list )
uniqueInstance ( ) { com . nilhcem . fakesmtp . core . Configuration a = Configuration . INSTANCE ; com . nilhcem . fakesmtp . core . Configuration b = Configuration . INSTANCE ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertSame ( a , b )
testLoadByHashKey_WhenDynamoDBMapperReturnsNull ( ) { org . socialsignin . spring . data . dynamodb . domain . sample . User user = dynamoDBTemplate . load ( org . socialsignin . spring . data . dynamodb . domain . sample . User . class , "someHashKey" ) ; "<AssertPlaceHolder>" ; } load ( java . lang . Class , java . lang . Object ) { T entity = dynamoDBMapper . load ( domainClass , hashKey ) ; if ( entity != null ) { maybeEmitEvent ( new org . socialsignin . spring . data . dynamodb . mapping . event . AfterLoadEvent < java . lang . Object > ( entity ) ) ; } return entity ; }
org . junit . Assert . assertNull ( user )
testNoRetry ( ) { com . google . common . util . concurrent . Service service = new io . cdap . cdap . common . service . AbstractRetryableScheduledService ( io . cdap . cdap . common . service . RetryStrategies . fixDelay ( 10L , TimeUnit . MILLISECONDS ) ) { @ io . cdap . cdap . common . service . Override protected long runTask ( ) throws io . cdap . cdap . common . service . Exception { throw new java . lang . Exception ( "Task<sp>failed" ) ; } @ io . cdap . cdap . common . service . Override protected boolean shouldRetry ( java . lang . Exception ex ) { return false ; } } ; service . start ( ) ; io . cdap . cdap . common . utils . Tasks . waitFor ( Service . State . FAILED , service :: state , 5 , TimeUnit . SECONDS , 10 , TimeUnit . MILLISECONDS ) ; try { service . stopAndWait ( ) ; } catch ( java . lang . Exception e ) { java . lang . Throwable rootCause = com . google . common . base . Throwables . getRootCause ( e ) ; "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( "Task<sp>failed" , rootCause . getMessage ( ) )
testProcessProjectId_gcloud ( ) { org . mockito . Mockito . when ( configReader . getProjectId ( ) ) . thenReturn ( "project-from-gcloud" ) ; org . mockito . Mockito . when ( runMojo . getProjectId ( ) ) . thenReturn ( ConfigReader . GCLOUD_CONFIG ) ; java . lang . String processedProjectId = testRunner . processProjectId ( ) ; "<AssertPlaceHolder>" ; } processProjectId ( ) { java . lang . String projectId = runMojo . getProjectId ( ) ; if ( ConfigReader . GCLOUD_CONFIG . equals ( projectId ) ) { return runMojo . getAppEngineFactory ( ) . newConfigReader ( ) . getProjectId ( ) ; } return projectId ; }
org . junit . Assert . assertEquals ( "project-from-gcloud" , processedProjectId )
testIsValidBackupFilename_withInvalidBackupFilename_fails ( ) { java . lang . String givenFilename = "/example/filename.zip1" ; boolean result = this . target . isValidBackupFilename ( givenFilename ) ; "<AssertPlaceHolder>" ; } isValidBackupFilename ( java . lang . String ) { return ( isValidZipBackupFilename ( filename ) ) || ( isValidEncryptedBackupFilename ( filename ) ) ; }
org . junit . Assert . assertFalse ( result )
testTaskNameInvalid1 ( ) { org . kie . workbench . common . stunner . bpmn . definition . property . task . TaskName taskName = new org . kie . workbench . common . stunner . bpmn . definition . property . task . TaskName ( org . kie . workbench . common . stunner . bpmn . definition . property . task . UserTaskTest . TASK_NAME_INVALID ) ; java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . bpmn . definition . property . task . TaskName > > violations = this . validator . validate ( taskName ) ; "<AssertPlaceHolder>" ; } size ( ) { return index . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , violations . size ( ) )
testSetMaximumLink ( ) { ospfLinkTed . setMaximumLink ( org . onlab . util . Bandwidth . bps ( 1234 ) ) ; "<AssertPlaceHolder>" ; } maximumLink ( ) { return maximumLink ; }
org . junit . Assert . assertThat ( ospfLinkTed . maximumLink ( ) , org . hamcrest . CoreMatchers . is ( org . onlab . util . Bandwidth . bps ( 1234 ) ) )
shouldRaiseNoConstraintViolation ( ) { org . agoncal . book . javaee7 . chapter03 . Customer customer = new org . agoncal . book . javaee7 . chapter03 . Customer ( "John" , "Smith" , "jsmith@gmail.com" ) ; java . util . Set < javax . validation . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . Customer > > violations = org . agoncal . book . javaee7 . chapter03 . CustomerIT . validator . validate ( customer ) ; "<AssertPlaceHolder>" ; } validate ( org . agoncal . book . javaee7 . chapter03 . ex04 . CreditCard04 ) { java . lang . String lastDigit = validationAlgorithm . validate ( creditCard . getNumber ( ) , creditCard . getControlNumber ( ) ) ; if ( ( ( java . lang . Integer . parseInt ( lastDigit . toString ( ) ) ) % 2 ) == 0 ) { return true ; } else { return false ; } }
org . junit . Assert . assertEquals ( 0 , violations . size ( ) )
testSoapMarshal ( ) { final org . apache . camel . dataformat . soap . SoapJaxbDataFormat format = new org . apache . camel . dataformat . soap . SoapJaxbDataFormat ( ) ; format . setContextPath ( "org.wildfly.camel.test.jaxb.model" ) ; org . apache . camel . CamelContext camelctx = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelctx . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { @ org . wildfly . camel . test . soap . Override public void configure ( ) throws org . wildfly . camel . test . soap . Exception { from ( "direct:start" ) . marshal ( format ) ; } } ) ; camelctx . start ( ) ; try ( java . io . InputStream input = getClass ( ) . getResourceAsStream ( "/envelope.xml" ) ) { java . lang . String expected = org . wildfly . camel . test . common . utils . XMLUtils . compactXML ( input ) ; org . apache . camel . ProducerTemplate producer = camelctx . createProducerTemplate ( ) ; org . wildfly . camel . test . jaxb . model . Customer customer = new org . wildfly . camel . test . jaxb . model . Customer ( "John" , "Doe" ) ; java . lang . String customerXML = producer . requestBody ( "direct:start" , customer , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } finally { camelctx . stop ( ) ; } } compactXML ( java . lang . String ) { return org . wildfly . camel . test . common . utils . XMLUtils . compactXML ( new java . io . ByteArrayInputStream ( xmlinput . getBytes ( ) ) ) ; }
org . junit . Assert . assertEquals ( expected , org . wildfly . camel . test . common . utils . XMLUtils . compactXML ( customerXML ) )
testLockRetention ( ) { initializeExpectedBucket ( 5 ) ; com . google . cloud . storage . Bucket expectedRetentionLockedBucket = expectedBucket . toBuilder ( ) . setRetentionPeriod ( com . google . cloud . storage . BucketTest . RETENTION_PERIOD ) . setRetentionPolicyIsLocked ( true ) . build ( ) ; expect ( storage . getOptions ( ) ) . andReturn ( mockOptions ) . times ( 2 ) ; expect ( storage . lockRetentionPolicy ( expectedRetentionLockedBucket , Storage . BucketTargetOption . metagenerationMatch ( ) , Storage . BucketTargetOption . userProject ( com . google . cloud . storage . BucketTest . USER_PROJECT ) ) ) . andReturn ( expectedRetentionLockedBucket ) ; replay ( storage ) ; initializeBucket ( ) ; com . google . cloud . storage . Bucket lockedRetentionPolicyBucket = new com . google . cloud . storage . Bucket ( storage , new com . google . cloud . storage . BucketInfo . BuilderImpl ( expectedRetentionLockedBucket ) ) ; com . google . cloud . storage . Bucket actualRetentionLockedBucket = lockedRetentionPolicyBucket . lockRetentionPolicy ( Storage . BucketTargetOption . metagenerationMatch ( ) , Storage . BucketTargetOption . userProject ( com . google . cloud . storage . BucketTest . USER_PROJECT ) ) ; "<AssertPlaceHolder>" ; } userProject ( java . lang . String ) { return new com . google . cloud . storage . Blob . BlobSourceOption ( StorageRpc . Option . USER_PROJECT , userProject ) ; }
org . junit . Assert . assertEquals ( expectedRetentionLockedBucket , actualRetentionLockedBucket )
testGetRequiredHostGroups___invalidComponentCountOfZero ( ) { java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > properties = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . lang . String > coreSiteMap = new java . util . HashMap ( ) ; properties . put ( "core-site" , coreSiteMap ) ; coreSiteMap . put ( "fs.defaultFS" , "localhost" ) ; org . apache . ambari . server . topology . Configuration clusterConfig = new org . apache . ambari . server . topology . Configuration ( properties , java . util . Collections . emptyMap ( ) ) ; expect ( stack . getCardinality ( "NAMENODE" ) ) . andReturn ( new org . apache . ambari . server . topology . Cardinality ( "1" ) ) . anyTimes ( ) ; java . util . Collection < java . lang . String > hgComponents1 = new java . util . HashSet ( ) ; hgComponents1 . add ( "HIVE_SERVER" ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . TestHostGroup group1 = new org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . TestHostGroup ( "HIVE_SERVER" 0 , hgComponents1 , java . util . Collections . singleton ( "host1" ) ) ; java . util . Collection < java . lang . String > hgComponents2 = new java . util . HashSet ( ) ; hgComponents2 . add ( "DATANODE" ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . TestHostGroup group2 = new org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . TestHostGroup ( "group2" , hgComponents2 , java . util . Collections . singleton ( "host2" ) ) ; java . util . Collection < org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessorTest . TestHostGroup > hostGroups = new java . util . ArrayList ( ) ; hostGroups . add ( group1 ) ; hostGroups . add ( group2 ) ; org . apache . ambari . server . topology . ClusterTopology topology = createClusterTopology ( bp , clusterConfig , hostGroups ) ; org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor updater = new org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor ( topology ) ; java . util . Collection < java . lang . String > requiredGroups = updater . getRequiredHostGroups ( ) ; "<AssertPlaceHolder>" ; } size ( ) { java . util . Set < java . lang . String > nodes = new java . util . HashSet < java . lang . String > ( ) ; for ( org . apache . ambari . eventdb . model . WorkflowDag . WorkflowDagEntry entry : entries ) { nodes . add ( entry . getSource ( ) ) ; nodes . addAll ( entry . getTargets ( ) ) ; } return nodes . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , requiredGroups . size ( ) )
logHelperTest_finestLogLevel_mapToFinestLogSeverity ( ) { java . util . logging . Level level = java . util . logging . Level . FINEST ; dk . i2m . converge . core . logging . LogSeverity severity = dk . i2m . converge . core . logging . LogHelper . toSeverity ( level ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder output = new java . lang . StringBuilder ( description ) ; output . append ( "<sp>/<sp>[" ) ; for ( dk . i2m . converge . core . logging . LogSubject subject : getSubjects ( ) ) { output . append ( "(" ) ; output . append ( subject . getEntity ( ) ) ; output . append ( ":<sp>" ) ; output . append ( subject . getEntityId ( ) ) ; output . append ( ")" ) ; } output . append ( "]" ) ; return output . toString ( ) ; }
org . junit . Assert . assertEquals ( LogSeverity . FINEST . toString ( ) , severity . toString ( ) )
testLD1fifthsecond ( ) { final long duration = 200000000 ; long end = ( java . lang . System . nanoTime ( ) ) + duration ; int syncCount = 0 ; while ( end > ( java . lang . System . nanoTime ( ) ) ) { helper . fireEvent ( new org . cytoscape . event . StubCyEvent ( "homer" ) ) ; syncCount ++ ; } end = ( java . lang . System . nanoTime ( ) ) + duration ; int payloadCount = 0 ; while ( end > ( java . lang . System . nanoTime ( ) ) ) { helper . addEventPayload ( "homer" , "marge" , org . cytoscape . event . StubCyPayloadEvent . class ) ; payloadCount ++ ; } helper . flushPayloadEvents ( ) ; System . out . println ( ( "payloadCount:<sp>" + payloadCount ) ) ; System . out . println ( ( "syncCount:<sp>" + syncCount ) ) ; System . out . println ( ( "diff:<sp>" + ( ( ( float ) ( payloadCount ) ) / ( ( float ) ( syncCount ) ) ) ) ) ; "<AssertPlaceHolder>" ; } flushPayloadEvents ( ) { }
org . junit . Assert . assertTrue ( ( payloadCount > ( syncCount * 3 ) ) )
batchFetchSizeTest ( ) { java . sql . Statement stmt = sharedConnection . createStatement ( ) ; java . sql . PreparedStatement pstmt = sharedConnection . prepareStatement ( "INSERT<sp>INTO<sp>fetchSizeTest1<sp>(test)<sp>values<sp>(?)" ) ; stmt . setFetchSize ( 1 ) ; pstmt . setFetchSize ( 1 ) ; for ( int i = 0 ; i < 10 ; i ++ ) { pstmt . setString ( 1 , ( "" + i ) ) ; pstmt . addBatch ( ) ; stmt . addBatch ( ( ( "INSERT<sp>INTO<sp>fetchSizeTest1<sp>(test)<sp>values<sp>('aaa" + i ) + "')" ) ) ; } pstmt . executeBatch ( ) ; stmt . executeBatch ( ) ; java . sql . ResultSet resultSet = stmt . executeQuery ( "SELECT<sp>count(*)<sp>from<sp>fetchSizeTest1" ) ; if ( resultSet . next ( ) ) { "<AssertPlaceHolder>" ; } else { org . junit . Assert . fail ( "must<sp>have<sp>resultset" ) ; } } getLong ( int ) { checkObjectRange ( columnIndex ) ; return row . getInternalLong ( columnsInformation [ ( columnIndex - 1 ) ] ) ; }
org . junit . Assert . assertEquals ( 20 , resultSet . getLong ( 1 ) )
stateMachineTraits075Test ( ) { cruise . umple . compiler . UmpleModel model = getModelByFilename ( "trait_test_data_0034.ump" ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "234" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } }
org . junit . Assert . assertTrue ( result )
deveObterRetornoEventoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . consulta . NFProtocoloEvento protocoloEvento = new com . fincatto . documentofiscal . nfe310 . classes . nota . consulta . NFProtocoloEvento ( ) ; final com . fincatto . documentofiscal . nfe310 . classes . evento . NFEventoRetorno infoEventoRetorno = new com . fincatto . documentofiscal . nfe310 . classes . evento . NFEventoRetorno ( ) ; protocoloEvento . setEventoRetorno ( infoEventoRetorno ) ; "<AssertPlaceHolder>" ; } getInfoEventoRetorno ( ) { return this . infoEventoRetorno ; }
org . junit . Assert . assertEquals ( infoEventoRetorno , protocoloEvento . getInfoEventoRetorno ( ) )
AccessInstanceVariable_SetArgumentValue ( ) { java . lang . String fromClass = "Domain.Direct.Violating.AccessInstanceVariable_SetArgumentValue" ; java . lang . String toClass = "Technology.Direct.Dao.CheckInDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Reference" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) )
should403WhenAuthenticatedButForbidden ( ) { server = org . neo4j . doc . server . helpers . CommunityServerBuilder . server ( ) . withDefaultDatabaseTuning ( ) . withSecurityRules ( org . neo4j . doc . server . rest . security . PermanentlyForbiddenSecurityRule . class . getCanonicalName ( ) , org . neo4j . doc . server . rest . security . PermanentlyPassingSecurityRule . class . getCanonicalName ( ) ) . usingDataDir ( folder . directory ( name . getMethodName ( ) ) . getAbsolutePath ( ) ) . build ( ) ; server . start ( ) ; functionalTestHelper = new org . neo4j . doc . server . helpers . FunctionalTestHelper ( server ) ; org . neo4j . doc . server . rest . JaxRsResponse clientResponse = gen . get ( ) . expectedStatus ( 403 ) . expectedType ( MediaType . APPLICATION_JSON_TYPE ) . get ( trimTrailingSlash ( functionalTestHelper . baseUri ( ) ) ) . response ( ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { org . neo4j . graphdb . Relationship firstStatus = underlyingNode . getSingleRelationship ( org . neo4j . examples . socnet . RelTypes . STATUS , Direction . OUTGOING ) ; if ( firstStatus == null ) { return java . util . Collections . emptyList ( ) ; } org . neo4j . graphdb . traversal . TraversalDescription traversal = graphDb ( ) . traversalDescription ( ) . depthFirst ( ) . relationships ( org . neo4j . examples . socnet . RelTypes . NEXT ) ; return new org . neo4j . helpers . collection . IterableWrapper < org . neo4j . examples . socnet . StatusUpdate , org . neo4j . graphdb . Path > ( traversal . traverse ( firstStatus . getEndNode ( ) ) ) { @ org . neo4j . examples . socnet . Override protected org . neo4j . examples . socnet . StatusUpdate underlyingObjectToObject ( org . neo4j . graphdb . Path path ) { return new org . neo4j . examples . socnet . StatusUpdate ( path . endNode ( ) ) ; } } ; }
org . junit . Assert . assertEquals ( 403 , clientResponse . getStatus ( ) )
testGetAllRoles ( ) { log . debug ( "entered<sp>'testGetAllRoles'<sp>method" ) ; org . appfuse . model . Role role = new org . appfuse . model . Role ( org . appfuse . Constants . ADMIN_ROLE ) ; final java . util . List < org . appfuse . model . Role > testData = new java . util . ArrayList < org . appfuse . model . Role > ( ) ; testData . add ( role ) ; context . checking ( new org . jmock . Expectations ( ) { { one ( lookupDao ) . getRoles ( ) ; will ( returnValue ( testData ) ) ; } } ) ; java . util . List < org . appfuse . model . LabelValue > roles = mgr . getAllRoles ( ) ; "<AssertPlaceHolder>" ; } getAllRoles ( ) { java . util . List < org . appfuse . model . Role > roles = dao . getRoles ( ) ; java . util . List < org . appfuse . model . LabelValue > list = new java . util . ArrayList < org . appfuse . model . LabelValue > ( ) ; for ( org . appfuse . model . Role role1 : roles ) { list . add ( new org . appfuse . model . LabelValue ( role1 . getName ( ) , role1 . getName ( ) ) ) ; } return list ; }
org . junit . Assert . assertTrue ( ( ( roles . size ( ) ) > 0 ) )
assertExecuteForMultiplePreparedStatementsSuccessWithDML ( ) { java . sql . PreparedStatement preparedStatement1 = getPreparedStatement ( ) ; java . sql . PreparedStatement preparedStatement2 = getPreparedStatement ( ) ; when ( preparedStatement1 . execute ( ) ) . thenReturn ( false ) ; when ( preparedStatement2 . execute ( ) ) . thenReturn ( false ) ; setExecuteGroups ( java . util . Arrays . asList ( preparedStatement1 , preparedStatement2 ) , SQLType . DML ) ; "<AssertPlaceHolder>" ; verify ( preparedStatement1 ) . execute ( ) ; verify ( preparedStatement2 ) . execute ( ) ; } execute ( ) { return execute ( new org . apache . shardingsphere . shardingjdbc . executor . StatementExecutor . Executor ( ) { @ org . apache . shardingsphere . shardingjdbc . executor . Override public boolean execute ( final java . sql . Statement statement , final java . lang . String sql ) throws java . sql . SQLException { return statement . execute ( sql ) ; } } ) ; }
org . junit . Assert . assertFalse ( actual . execute ( ) )
age_minSizeConstraint_fieldIsRequired ( ) { com . vaadin . flow . data . binder . BeanValidationBinder < com . vaadin . flow . data . binder . BeanBinderTest . RequiredConstraints > binder = new com . vaadin . flow . data . binder . BeanValidationBinder ( com . vaadin . flow . data . binder . BeanBinderTest . RequiredConstraints . class ) ; com . vaadin . flow . data . binder . BeanBinderTest . RequiredConstraints bean = new com . vaadin . flow . data . binder . BeanBinderTest . RequiredConstraints ( ) ; com . vaadin . flow . data . binder . testcomponents . TestTextField field = new com . vaadin . flow . data . binder . testcomponents . TestTextField ( ) ; binder . bind ( field , "age" ) ; binder . setBean ( bean ) ; "<AssertPlaceHolder>" ; testSerialization ( binder ) ; } isRequiredIndicatorVisible ( ) { return com . vaadin . flow . component . HasValueAndElement . getElement ( ) . getProperty ( "required" , false ) ; }
org . junit . Assert . assertTrue ( field . isRequiredIndicatorVisible ( ) )
moveThreadCountIsResolvedToNullWhenValueIsNone ( ) { org . optaplanner . core . config . solver . SolverConfig solverConfig = new org . optaplanner . core . config . solver . SolverConfig ( ) ; solverConfig . setMoveThreadCount ( SolverConfig . MOVE_THREAD_COUNT_NONE ) ; "<AssertPlaceHolder>" ; } resolveMoveThreadCount ( ) { int availableProcessorCount = getAvailableProcessors ( ) ; java . lang . Integer resolvedMoveThreadCount ; if ( ( ( moveThreadCount ) == null ) || ( moveThreadCount . equals ( org . optaplanner . core . config . solver . SolverConfig . MOVE_THREAD_COUNT_NONE ) ) ) { return null ; } else if ( moveThreadCount . equals ( org . optaplanner . core . config . solver . SolverConfig . MOVE_THREAD_COUNT_AUTO ) ) { resolvedMoveThreadCount = availableProcessorCount - 2 ; if ( resolvedMoveThreadCount <= 1 ) { return null ; } } else { resolvedMoveThreadCount = org . optaplanner . core . config . util . ConfigUtils . resolveThreadPoolSizeScript ( "moveThreadCount" , moveThreadCount , org . optaplanner . core . config . solver . SolverConfig . MOVE_THREAD_COUNT_NONE , org . optaplanner . core . config . solver . SolverConfig . MOVE_THREAD_COUNT_AUTO ) ; } if ( resolvedMoveThreadCount < 1 ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( "The<sp>moveThreadCount<sp>(" + ( moveThreadCount ) ) + ")<sp>resulted<sp>in<sp>a<sp>resolvedMoveThreadCount<sp>(" ) + resolvedMoveThreadCount ) + ")<sp>that<sp>is<sp>lower<sp>than<sp>1." ) ) ; } if ( resolvedMoveThreadCount > availableProcessorCount ) { org . optaplanner . core . config . solver . SolverConfig . logger . warn ( ( "The<sp>resolvedMoveThreadCount<sp>({})<sp>is<sp>higher<sp>" + "than<sp>the<sp>availableProcessorCount<sp>({}),<sp>which<sp>is<sp>counter-efficient." ) , resolvedMoveThreadCount , availableProcessorCount ) ; } return resolvedMoveThreadCount ; }
org . junit . Assert . assertNull ( solverConfig . resolveMoveThreadCount ( ) )
duplicateValuesAreOverridden ( ) { com . facebook . buck . util . config . RawConfig rawConfig = com . facebook . buck . util . config . RawConfig . builder ( ) . putAll ( com . google . common . collect . ImmutableMap . of ( "section" , com . google . common . collect . ImmutableMap . of ( "field" , "value1" ) ) ) . putAll ( com . google . common . collect . ImmutableMap . of ( "section" , com . google . common . collect . ImmutableMap . of ( "field" , "value2" ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } getValue ( com . facebook . buck . core . rulekey . AddsToRuleKey , java . lang . reflect . Field ) { try { @ com . facebook . buck . rules . modern . SuppressWarnings ( "unchecked" ) T converted = ( ( T ) ( field . get ( value ) ) ) ; return converted ; } catch ( java . lang . IllegalAccessException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertThat ( rawConfig . getValue ( "section" , "field" ) , org . hamcrest . Matchers . equalTo ( java . util . Optional . of ( "value2" ) ) )
testJarWithManifestInNonAsciiDir ( ) { java . lang . String mainjarstring = buildRule . getProject ( ) . getProperty ( "main.jar.nonascii" ) ; java . lang . String extjarstring = buildRule . getProject ( ) . getProperty ( "ext.jar.nonascii" ) ; org . apache . tools . ant . types . Path myPath = new org . apache . tools . ant . types . Path ( buildRule . getProject ( ) ) ; myPath . setLocation ( new java . io . File ( mainjarstring ) ) ; buildRule . getProject ( ) . setUserProperty ( "build.sysclasspath" , "ignore" ) ; loader = buildRule . getProject ( ) . createClassLoader ( myPath ) ; java . lang . String path = loader . getClasspath ( ) ; "<AssertPlaceHolder>" ; } getClasspath ( ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( final java . io . File component : pathComponents ) { if ( ( sb . length ( ) ) > 0 ) { sb . append ( File . pathSeparator ) ; } sb . append ( component . getAbsolutePath ( ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( ( ( mainjarstring + ( java . io . File . pathSeparator ) ) + extjarstring ) , path )
testValueConverterException ( ) { org . eclipse . emf . ecore . EClass eClass = EcoreFactory . eINSTANCE . createEClass ( ) ; final org . eclipse . xtext . nodemodel . ILeafNode node = new org . eclipse . xtext . nodemodel . impl . LeafNode ( ) ; final org . eclipse . xtext . conversion . ValueConverterException expected = new org . eclipse . xtext . conversion . ValueConverterException ( "Foo" , node , null ) ; org . eclipse . xtext . xbase . lib . Functions . Function2 < java . lang . String , org . eclipse . xtext . nodemodel . INode , java . lang . Object > toValueImpl = new org . eclipse . xtext . xbase . lib . Functions . Function2 < java . lang . String , org . eclipse . xtext . nodemodel . INode , java . lang . Object > ( ) { @ org . eclipse . xtext . parser . Override public java . lang . Object apply ( java . lang . String lexerRule , org . eclipse . xtext . nodemodel . INode nodeParam ) { if ( ( "foo" . equals ( lexerRule ) ) && ( node . equals ( nodeParam ) ) ) { throw expected ; } org . junit . Assert . fail ( ) ; return null ; } } ; org . eclipse . xtext . parser . DefaultEcoreElementFactory factory = new org . eclipse . xtext . parser . DefaultEcoreElementFactory ( ) ; factory . setConverterService ( new org . eclipse . xtext . parser . DefaultEcoreElementFactoryTest . MockedConverterService ( toValueImpl ) ) ; try { factory . set ( eClass , "abstract" , null , "foo" , node ) ; org . junit . Assert . fail ( "Expected<sp>ValueConverterException" ) ; } catch ( org . eclipse . xtext . conversion . ValueConverterException ex ) { "<AssertPlaceHolder>" ; } } fail ( java . lang . String ) { throw new java . lang . AssertionError ( message ) ; }
org . junit . Assert . assertSame ( expected , ex )
testDegRad ( ) { double epsilon = 3.0E-16 ; for ( int maxOrder = 0 ; maxOrder < 6 ; ++ maxOrder ) { for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . apache . commons . math4 . analysis . differentiation . DerivativeStructure dsX = new org . apache . commons . math4 . analysis . differentiation . DerivativeStructure ( 1 , maxOrder , 0 , x ) ; org . apache . commons . math4 . analysis . differentiation . DerivativeStructure rebuiltX = dsX . toDegrees ( ) . toRadians ( ) ; org . apache . commons . math4 . analysis . differentiation . DerivativeStructure zero = rebuiltX . subtract ( dsX ) ; for ( int n = 0 ; n <= maxOrder ; ++ n ) { "<AssertPlaceHolder>" ; } } } } getPartialDerivative ( int [ ] ) { return data [ compiler . getPartialDerivativeIndex ( orders ) ] ; }
org . junit . Assert . assertEquals ( 0.0 , zero . getPartialDerivative ( n ) , epsilon )
givenDailyMailBoards_whenParse_thenRobotsObjectEqualsExpected ( ) { java . io . Reader reader = com . brandwatch . robots . AbstractDataTest . resourceReader ( "http_boards.dailymail.co.uk_robots.txt" ) ; com . brandwatch . robots . parser . RobotsParser robotsTxtParser = new com . brandwatch . robots . parser . RobotsParserImpl ( reader ) ; com . brandwatch . robots . RobotsBuildingParseHandler handler = new com . brandwatch . robots . RobotsBuildingParseHandler ( pathExpressionCompiler , agentExpressionCompiler ) ; robotsTxtParser . parse ( handler ) ; com . brandwatch . robots . Robots expected = new com . brandwatch . robots . Robots . Builder ( ) . withGroup ( new com . brandwatch . robots . Group . Builder ( ) . withDirective ( new com . brandwatch . robots . AgentDirective ( "*" , agentExpressionCompiler . compile ( "*" ) ) ) . withDirective ( new com . brandwatch . robots . PathDirective ( PathDirective . Field . disallow , "*.js" , ALL ) ) . withDirective ( new com . brandwatch . robots . PathDirective ( PathDirective . Field . disallow , "/search.php*" , ALL ) ) . withDirective ( new com . brandwatch . robots . PathDirective ( PathDirective . Field . disallow , "/includes/" , ALL ) ) . withDirective ( new com . brandwatch . robots . PathDirective ( PathDirective . Field . disallow , "/install/" , ALL ) ) . withDirective ( new com . brandwatch . robots . PathDirective ( PathDirective . Field . disallow , "/customavatars/" , ALL ) ) . build ( ) ) . build ( ) ; com . brandwatch . robots . Robots actual = handler . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return robots . build ( ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . equalTo ( expected ) )
testSimplePutDelete ( ) { org . apache . hadoop . hbase . replication . TestReplication . LOG . info ( "testSimplePutDelete" ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( org . apache . hadoop . hbase . replication . TestReplication . row ) ; put . add ( org . apache . hadoop . hbase . replication . TestReplication . famName , org . apache . hadoop . hbase . replication . TestReplication . row , org . apache . hadoop . hbase . replication . TestReplication . row ) ; org . apache . hadoop . hbase . replication . TestReplication . htable1 = new org . apache . hadoop . hbase . client . HTable ( org . apache . hadoop . hbase . replication . TestReplication . conf1 , org . apache . hadoop . hbase . replication . TestReplication . tableName ) ; org . apache . hadoop . hbase . replication . TestReplication . htable1 . put ( put ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( org . apache . hadoop . hbase . replication . TestReplication . row ) ; for ( int i = 0 ; i < ( org . apache . hadoop . hbase . replication . TestReplication . NB_RETRIES ) ; i ++ ) { if ( i == ( ( org . apache . hadoop . hbase . replication . TestReplication . NB_RETRIES ) - 1 ) ) { org . junit . Assert . fail ( "Waited<sp>too<sp>much<sp>time<sp>for<sp>put<sp>replication" ) ; } org . apache . hadoop . hbase . client . Result res = org . apache . hadoop . hbase . replication . TestReplication . htable2 . get ( get ) ; if ( ( res . size ( ) ) == 0 ) { org . apache . hadoop . hbase . replication . TestReplication . LOG . info ( "Row<sp>not<sp>available" ) ; java . lang . Thread . sleep ( org . apache . hadoop . hbase . replication . TestReplication . SLEEP_TIME ) ; } else { "<AssertPlaceHolder>" ; break ; } } org . apache . hadoop . hbase . client . Delete del = new org . apache . hadoop . hbase . client . Delete ( org . apache . hadoop . hbase . replication . TestReplication . row ) ; org . apache . hadoop . hbase . replication . TestReplication . htable1 . delete ( del ) ; get = new org . apache . hadoop . hbase . client . Get ( org . apache . hadoop . hbase . replication . TestReplication . row ) ; for ( int i = 0 ; i < ( org . apache . hadoop . hbase . replication . TestReplication . NB_RETRIES ) ; i ++ ) { if ( i == ( ( org . apache . hadoop . hbase . replication . TestReplication . NB_RETRIES ) - 1 ) ) { org . junit . Assert . fail ( "Waited<sp>too<sp>much<sp>time<sp>for<sp>del<sp>replication" ) ; } org . apache . hadoop . hbase . client . Result res = org . apache . hadoop . hbase . replication . TestReplication . htable2 . get ( get ) ; if ( ( res . size ( ) ) >= 1 ) { org . apache . hadoop . hbase . replication . TestReplication . LOG . info ( "Row<sp>not<sp>deleted" ) ; java . lang . Thread . sleep ( org . apache . hadoop . hbase . replication . TestReplication . SLEEP_TIME ) ; } else { break ; } } } value ( ) { if ( isEmpty ( ) ) { return null ; } return kvs [ 0 ] . getValue ( ) ; }
org . junit . Assert . assertArrayEquals ( res . value ( ) , org . apache . hadoop . hbase . replication . TestReplication . row )
generateKeyPairTest ( ) { cn . hutool . crypto . GlobalBouncyCastleProvider . setUseBouncyCastle ( false ) ; java . security . KeyPair pair = cn . hutool . crypto . KeyUtil . generateKeyPair ( "SM2" ) ; "<AssertPlaceHolder>" ; } generateKeyPair ( java . lang . String ) { return cn . hutool . crypto . KeyUtil . generateKeyPair ( algorithm , cn . hutool . crypto . KeyUtil . DEFAULT_KEY_SIZE ) ; }
org . junit . Assert . assertNotNull ( pair )
getRolePermissionTestRest ( ) { org . geosdi . geoplatform . response . collection . GuiComponentsPermissionMapData wsAdminMapData = gpWSClient . getRolePermission ( GPRole . ADMIN . getRole ( ) , organizationNameRSTest ) ; logger . trace ( ( "\n\n@@@@@@@@@@@@@@@@@@@@@@@@@@@RETRIEVE<sp>GuiComponents<sp>for" + "<sp>ADMIN_ROLE<sp>:<sp>{}\n\n" ) , wsAdminMapData ) ; "<AssertPlaceHolder>" ; } getPermissionMap ( ) { return map ; }
org . junit . Assert . assertEquals ( 0 , wsAdminMapData . getPermissionMap ( ) . size ( ) )
normalizeToNfc_combiningMarkOrder ( ) { final char [ ] sequence_ab = new char [ ] { 'q' , 775 , 803 } ; final char [ ] sequence_ba = new char [ ] { 'q' , 803 , 775 } ; final char [ ] normalized_ab = textNormalizer . normalizeToNfc ( sequence_ab ) ; final char [ ] normalized_ba = textNormalizer . normalizeToNfc ( sequence_ba ) ; "<AssertPlaceHolder>" ; } normalizeToNfc ( char [ ] ) { return java . text . Normalizer . normalize ( java . nio . CharBuffer . wrap ( source ) , Normalizer . Form . NFC ) . toCharArray ( ) ; }
org . junit . Assert . assertThat ( normalized_ab , org . hamcrest . CoreMatchers . equalTo ( normalized_ba ) )
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . timesheet . type . TimeSheetType entity = new org . lnu . is . domain . timesheet . type . TimeSheetType ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testJoinClauseListAsEmpty ( ) { java . util . List < com . sap . core . odata . processor . api . jpa . access . JPAJoinClause > joinClauseList = new java . util . ArrayList < com . sap . core . odata . processor . api . jpa . access . JPAJoinClause > ( ) ; setUp ( joinClauseList ) ; com . sap . core . odata . processor . core . jpa . jpql . JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new com . sap . core . odata . processor . core . jpa . jpql . JPQLJoinSelectSingleStatementBuilder ( context ) ; try { jpqlJoinSelectsingleStatementBuilder . build ( ) ; org . junit . Assert . fail ( "Should<sp>not<sp>have<sp>come<sp>here" ) ; } catch ( com . sap . core . odata . processor . api . jpa . exception . ODataJPARuntimeException e ) { "<AssertPlaceHolder>" ; } } build ( ) { return properties ; }
org . junit . Assert . assertTrue ( true )
testFunctionality ( ) { verify ( view ) . init ( input ) ; verify ( component ) . setValueChangedCommand ( any ( ) ) ; input . asWidget ( ) ; verify ( view ) . asWidget ( ) ; input . init ( java . lang . String . class . getName ( ) ) ; verify ( component ) . init ( java . lang . String . class . getName ( ) ) ; "<AssertPlaceHolder>" ; input . setPageSize ( org . kie . workbench . common . forms . dynamic . client . rendering . renderers . lov . creator . input . MultipleInputTest . PAGE_SIZE ) ; verify ( component ) . setPageSize ( org . kie . workbench . common . forms . dynamic . client . rendering . renderers . lov . creator . input . MultipleInputTest . PAGE_SIZE ) ; input . setReadOnly ( false ) ; verify ( component ) . setReadOnly ( anyBoolean ( ) ) ; input . getValue ( ) ; verify ( component ) . getValues ( ) ; } getComponent ( ) { return component ; }
org . junit . Assert . assertEquals ( component , input . getComponent ( ) )
filterNullCookies ( ) { javax . servlet . http . HttpServletRequest request = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletRequest . class ) ; org . mockito . Mockito . when ( request . getCookies ( ) ) . thenReturn ( null ) ; org . mockito . Mockito . when ( request . getRemoteAddr ( ) ) . thenReturn ( proxyHost ) ; javax . servlet . http . HttpServletResponse response = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletResponse . class ) ; final java . util . concurrent . atomic . AtomicBoolean invoked = new java . util . concurrent . atomic . AtomicBoolean ( ) ; javax . servlet . FilterChain chain = new javax . servlet . FilterChain ( ) { @ org . apache . hadoop . yarn . server . webproxy . amfilter . Override public void doFilter ( javax . servlet . ServletRequest servletRequest , javax . servlet . ServletResponse servletResponse ) throws java . io . IOException , javax . servlet . ServletException { invoked . set ( true ) ; } } ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( AmIpFilter . PROXY_HOST , proxyHost ) ; params . put ( AmIpFilter . PROXY_URI_BASE , proxyUri ) ; javax . servlet . FilterConfig conf = new org . apache . hadoop . yarn . server . webproxy . amfilter . TestAmFilter . DummyFilterConfig ( params ) ; javax . servlet . Filter filter = new org . apache . hadoop . yarn . server . webproxy . amfilter . TestAmFilter . TestAmIpFilter ( ) ; filter . init ( conf ) ; filter . doFilter ( request , response , chain ) ; "<AssertPlaceHolder>" ; filter . destroy ( ) ; } get ( ) { return org . hadoop . ozone . recon . codegen . JooqCodeGenerator . LocalDataSourceProvider . db ; }
org . junit . Assert . assertTrue ( invoked . get ( ) )
isNewReceiptRequiredTestWarehouseOverride ( ) { final de . metas . inoutcandidate . model . I_M_ReceiptSchedule previousReceiptSchedule = createReceiptSchedule ( bpartner1 , warehouse1 , date , product1_wh1 , 10 ) ; final de . metas . inoutcandidate . model . I_M_ReceiptSchedule receiptSchedule = createReceiptSchedule ( bpartner1 , warehouse1 , date , product1_wh1 , 10 ) ; previousReceiptSchedule . setM_Warehouse_Override_ID ( 12 ) ; receiptSchedule . setM_Warehouse_Override_ID ( 14 ) ; final boolean isNewRequired = inOutProducer . isNewReceiptRequired ( previousReceiptSchedule , receiptSchedule ) ; "<AssertPlaceHolder>" ; } isNewReceiptRequired ( de . metas . inoutcandidate . model . I_M_ReceiptSchedule , de . metas . inoutcandidate . model . I_M_ReceiptSchedule ) { de . metas . util . Check . assumeNotNull ( previousReceiptSchedule , "previousReceiptSchedule<sp>not<sp>null" ) ; de . metas . util . Check . assumeNotNull ( receiptSchedule , "receiptSchedule<sp>not<sp>null" ) ; if ( ! ( headerAggregationKeyBuilder . isSame ( previousReceiptSchedule , receiptSchedule ) ) ) { return true ; } if ( ( previousReceiptSchedule . getC_Order_ID ( ) ) != ( receiptSchedule . getC_Order_ID ( ) ) ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( isNewRequired )
logHelperTest_severeLogSeverity_mapToSevereLogLevel ( ) { dk . i2m . converge . core . logging . LogSeverity severity = LogSeverity . SEVERE ; java . util . logging . Level level = dk . i2m . converge . core . logging . LogHelper . toLevel ( severity ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder output = new java . lang . StringBuilder ( description ) ; output . append ( "<sp>/<sp>[" ) ; for ( dk . i2m . converge . core . logging . LogSubject subject : getSubjects ( ) ) { output . append ( "(" ) ; output . append ( subject . getEntity ( ) ) ; output . append ( ":<sp>" ) ; output . append ( subject . getEntityId ( ) ) ; output . append ( ")" ) ; } output . append ( "]" ) ; return output . toString ( ) ; }
org . junit . Assert . assertEquals ( Level . SEVERE . toString ( ) , level . toString ( ) )
remoteExecutionEnabled ( ) { com . facebook . buck . rules . modern . impl . BuildableSerializerTest . RemoteExecutionConditional enabled = new com . facebook . buck . rules . modern . impl . BuildableSerializerTest . RemoteExecutionConditional ( true ) ; com . facebook . buck . rules . modern . impl . BuildableSerializerTest . RemoteExecutionConditional newInstance = test ( enabled ) ; "<AssertPlaceHolder>" ; } test ( com . facebook . buck . jvm . java . abi . DescriptorAndSignatureFactoryTestBase$TestRunnable ) { generateCorrectClassFiles ( ) ; runTest ( r ) ; }
org . junit . Assert . assertTrue ( newInstance . enabled )
should_write_only_lower_breakend ( ) { create ( ) ; getCmd ( ) . doWork ( ) ; "<AssertPlaceHolder>" ; } parse ( ) { return com . google . common . collect . Lists . transform ( java . nio . file . Files . readAllLines ( bedpe ( ) . toPath ( ) , StandardCharsets . US_ASCII ) , new com . google . common . base . Function < java . lang . String , java . util . List < java . lang . String > > ( ) { @ au . edu . wehi . idsv . Override public java . util . List < java . lang . String > apply ( java . lang . String input ) { return com . google . common . collect . Lists . newArrayList ( input . split ( "\\s" ) ) ; } } ) ; }
org . junit . Assert . assertEquals ( 2 , parse ( ) . size ( ) )
assertIsNotSingleTable ( ) { org . apache . shardingsphere . core . parse . old . parser . context . table . Tables tables = new org . apache . shardingsphere . core . parse . old . parser . context . table . Tables ( ) ; tables . add ( new org . apache . shardingsphere . core . parse . old . parser . context . table . Table ( "table_1" , "tbl_1" ) ) ; tables . add ( new org . apache . shardingsphere . core . parse . old . parser . context . table . Table ( "table_2" , "tbl_2" ) ) ; "<AssertPlaceHolder>" ; } isSingleTable ( ) { return 1 == ( tables . size ( ) ) ; }
org . junit . Assert . assertFalse ( tables . isSingleTable ( ) )
evaluateRetourneertTrueBijAttribuutInOnderzoek ( ) { when ( groep . getAttributen ( ) ) . thenReturn ( singletonList ( attribuut ) ) ; when ( attribuut . isInOnderzoek ( ) ) . thenReturn ( true ) ; final boolean result = predikaat . evaluate ( groep ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { if ( object instanceof nl . bzk . brp . model . basis . FormeelHistorisch ) { final nl . bzk . brp . model . basis . FormeelHistorisch entiteit = ( ( nl . bzk . brp . model . basis . FormeelHistorisch ) ( object ) ) ; final nl . bzk . brp . model . basis . FormeleHistorieModel formeleHistorie = entiteit . getFormeleHistorie ( ) ; return formeleHistorieGeldigOpPeilmoment ( formeleHistorie ) ; } else { final nl . bzk . brp . model . basis . MaterieelHistorisch entiteit = ( ( nl . bzk . brp . model . basis . MaterieelHistorisch ) ( object ) ) ; final nl . bzk . brp . model . basis . MaterieleHistorieModel materieleHistorie = entiteit . getMaterieleHistorie ( ) ; final nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut eindDatumTijd = materieleHistorie . getDatumEindeGeldigheid ( ) ; final nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut aanvangDatum = materieleHistorie . getDatumAanvangGeldigheid ( ) ; final boolean formeleHistorieGeldig = formeleHistorieGeldigOpPeilmoment ( materieleHistorie ) ; return ( formeleHistorieGeldig && ( ( eindDatumTijd == null ) || ( eindDatumTijd . na ( peilDatum ) ) ) ) && ( ( aanvangDatum . voor ( peilDatum ) ) || ( aanvangDatum . getWaarde ( ) . equals ( peilDatum . getWaarde ( ) ) ) ) ; } }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( true ) )
testIndexRangeSeekWithSpatial ( ) { org . junit . Assume . assumeTrue ( testSuite . supportsSpatial ( ) ) ; org . neo4j . values . storable . PointValue p1 = org . neo4j . values . storable . Values . pointValue ( CoordinateReferenceSystem . WGS84 , ( - 180 ) , ( - 1 ) ) ; org . neo4j . values . storable . PointValue p2 = org . neo4j . values . storable . Values . pointValue ( CoordinateReferenceSystem . WGS84 , ( - 180 ) , 1 ) ; org . neo4j . values . storable . PointValue p3 = org . neo4j . values . storable . Values . pointValue ( CoordinateReferenceSystem . WGS84 , 0 , 0 ) ; updateAndCommit ( java . util . Arrays . asList ( org . neo4j . kernel . api . index . IndexQueryHelper . add ( 1L , descriptor . schema ( ) , p1 ) , org . neo4j . kernel . api . index . IndexQueryHelper . add ( 2L , descriptor . schema ( ) , p2 ) , org . neo4j . kernel . api . index . IndexQueryHelper . add ( 3L , descriptor . schema ( ) , p3 ) ) ) ; "<AssertPlaceHolder>" ; } range ( int , java . lang . Number , boolean , java . lang . Number , boolean ) { return new org . neo4j . internal . kernel . api . IndexQuery . NumberRangePredicate ( propertyKeyId , ( from == null ? null : org . neo4j . values . storable . Values . numberValue ( from ) ) , fromInclusive , ( to == null ? null : org . neo4j . values . storable . Values . numberValue ( to ) ) , toInclusive ) ; }
org . junit . Assert . assertThat ( query ( range ( 1 , p1 , true , p2 , true ) ) , org . hamcrest . Matchers . contains ( 1L , 2L ) )
shouldIdentifyJwtWithTooFewDots ( ) { boolean isValid = org . dcache . gplazma . util . JsonWebToken . isCompatibleFormat ( ( "eyJraWQiOiJyc2ExIiwiYWxnIjoiUlMyNTYifQeyJzdWIiOiJlYTFhM2U1Ny" + ( ( ( ( ( ( "0yMTU1LTQ4OTUtOWRjNy03N2MzMjgyYWE3MWIiLCJpc3MiOiJodHRwczpcL" + "1wvaWFtLmV4dHJlbWUtZGF0YWNsb3VkLmV1XC8iLCJleHAiOjE1NTIyOTg0" ) + "MTcsImlhdCI6MTU1MjI5NDgxNywianRpIjoiY2M5YjZhNWMtODI0MC00NTV" ) + "jLTk4ZGItNzgxM2MyYWJjZWZjIn0.Rmc16S2Y-Eae8zLXQJq-_C4xsV9Sik" ) + "Wpbn9J2lRVBKGEBp_8UvZgv6CdTfvhaRS7JBmAioc_ubLFqh2sBt478xgjB" ) + "FVEiSol5uAMtdxjZSxFZeVCRPXPbgvQLpHIo9jhpWl-YfC18wW_Js9grL8I" ) + "cZfb87_sT-dtXL_ctFHvmic" ) ) ) ; "<AssertPlaceHolder>" ; } isCompatibleFormat ( java . lang . String ) { java . util . List < java . lang . String > elements = com . google . common . base . Splitter . on ( '.' ) . limit ( 3 ) . splitToList ( token ) ; return ( ( elements . size ( ) ) == 3 ) && ( elements . stream ( ) . allMatch ( org . dcache . gplazma . util . JsonWebToken :: isBase64Encoded ) ) ; }
org . junit . Assert . assertFalse ( isValid )
testSetResponseVariable ( ) { java . lang . String expResult = "http://localhost:54321null?response_variable=1" ; java . lang . Integer value = 1 ; instance = new edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . RFTreeViewBuilder ( ) ; encoder = new edu . oswego . csc480_hci521_2013 . server . ServerUrlEncoder ( ) ; instance . setResponseVariable ( 1 ) ; "<AssertPlaceHolder>" ; } build ( edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . UrlEncoder ) { java . lang . StringBuilder query = new java . lang . StringBuilder ( ) ; for ( java . lang . String key : args . keySet ( ) ) { for ( java . lang . String value : args . get ( key ) ) { if ( ( query . length ( ) ) == 0 ) { query . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } else { query . append ( '&' ) . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } } } java . lang . String url = ( ( ( ( ( ( ( protocol ) + "://" ) + ( host ) ) + ":" ) + ( port ) ) + ( page ) ) + ( ( query . length ( ) ) > 0 ? "?" : "" ) ) + ( query . toString ( ) ) ; return url ; }
org . junit . Assert . assertEquals ( expResult , instance . build ( encoder ) )
testBuildWithOrderBy ( ) { org . lnu . is . domain . enrolment . subject . EnrolmentSubject context = new org . lnu . is . domain . enrolment . subject . EnrolmentSubject ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "parent" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy4 = new org . lnu . is . pagination . OrderBy ( "isTesting" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 , orderBy4 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentSubject<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.parent<sp>ASC,<sp>e.abbrName<sp>DESC,<sp>e.name<sp>ASC,<sp>e.isTesting<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . subject . EnrolmentSubject > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testGetAllHierarchyTypes ( ) { when ( hierarchyTypeService . getAllHierarchyTypes ( ) ) . thenReturn ( java . util . Arrays . asList ( expectedHierarchyType1 , expectedHierarchyType2 ) ) ; java . util . List < org . egov . infra . admin . master . entity . HierarchyType > hierarchyTypes = hierarchyTypeService . getAllHierarchyTypes ( ) ; "<AssertPlaceHolder>" ; verify ( hierarchyTypeRepository ) . findAll ( ) ; } size ( ) { return messages . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , hierarchyTypes . size ( ) )
givenProfileIdWhenDownloadProfileFileThenOK ( ) { when ( fr . gouv . vitam . access . external . client . AdminExternalClientRestTest . mock . get ( ) ) . thenReturn ( fr . gouv . vitam . common . external . client . ClientMockResultHelper . getObjectStream ( ) ) ; try ( fr . gouv . vitam . access . external . client . AdminExternalClientRest client = ( ( fr . gouv . vitam . access . external . client . AdminExternalClientRest ) ( fr . gouv . vitam . access . external . client . AdminExternalClientRestTest . vitamServerTestRunner . getClient ( ) ) ) ) { javax . ws . rs . core . Response response = client . downloadProfileFile ( new fr . gouv . vitam . common . client . VitamContext ( TENANT_ID ) , "OP_ID" ) ; "<AssertPlaceHolder>" ; } } downloadProfileFile ( fr . gouv . vitam . common . client . VitamContext , java . lang . String ) { return new fr . gouv . vitam . common . external . client . AbstractMockClient . FakeInboundResponse ( javax . ws . rs . core . Response . Status . OK , fr . gouv . vitam . common . stream . StreamUtils . toInputStream ( "Vitam<sp>Test" ) , javax . ws . rs . core . MediaType . APPLICATION_OCTET_STREAM_TYPE , null ) ; }
org . junit . Assert . assertNotNull ( response )
test_findByNameIsNotNullAndAgeIsNotNull ( ) { java . lang . String dynamicQuery = new java . lang . Exception ( ) . getStackTrace ( ) [ 0 ] . getMethodName ( ) . split ( "_" ) [ 1 ] ; java . lang . String query = "SELECT<sp>*<sp>FROM<sp>sometable<sp>WHERE<sp>name<sp>IS<sp>NOT<sp>NULL<sp>AND<sp>age<sp>IS<sp>NOT<sp>NULL" ; "<AssertPlaceHolder>" ; } doTest ( java . lang . String , java . lang . String ) { try { jongo . sql . DynamicFinder d = jongo . sql . DynamicFinder . valueOf ( "sometable" , dynamicQuery ) ; return d . getSql ( ) . equalsIgnoreCase ( query ) ; } catch ( jongo . exceptions . JongoBadRequestException ex ) { System . out . print ( ex . getMessage ( ) ) ; } return false ; }
org . junit . Assert . assertTrue ( doTest ( dynamicQuery , query ) )
testMSTORE_5 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "61123454" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; }
org . junit . Assert . assertTrue ( program . isStopped ( ) )
testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot ( ) { logStart ( "testHandleAppendEntriesWhenOutOfSyncLogDetectedRequestForceInstallSnapshot" ) ; org . opendaylight . controller . cluster . raft . MockRaftActorContext context = createActorContext ( ) ; context . getTermInformation ( ) . update ( 1 , "test" ) ; org . opendaylight . controller . cluster . raft . MockRaftActorContext . SimpleReplicatedLog log = new org . opendaylight . controller . cluster . raft . MockRaftActorContext . SimpleReplicatedLog ( ) ; log . append ( org . opendaylight . controller . cluster . raft . behaviors . FollowerTest . newReplicatedLogEntry ( 1 , 0 , "zero" ) ) ; log . append ( org . opendaylight . controller . cluster . raft . behaviors . FollowerTest . newReplicatedLogEntry ( 1 , 1 , "one" ) ) ; log . append ( org . opendaylight . controller . cluster . raft . behaviors . FollowerTest . newReplicatedLogEntry ( 1 , 2 , "two" ) ) ; context . setReplicatedLog ( log ) ; java . util . List < org . opendaylight . controller . cluster . raft . ReplicatedLogEntry > entries = new java . util . ArrayList ( ) ; entries . add ( org . opendaylight . controller . cluster . raft . behaviors . FollowerTest . newReplicatedLogEntry ( 2 , 2 , "two-1" ) ) ; entries . add ( org . opendaylight . controller . cluster . raft . behaviors . FollowerTest . newReplicatedLogEntry ( 2 , 3 , "three" ) ) ; org . opendaylight . controller . cluster . raft . messages . AppendEntries appendEntries = new org . opendaylight . controller . cluster . raft . messages . AppendEntries ( 2 , "leader" , 1 , 1 , entries , 3 , ( - 1 ) , ( ( short ) ( 0 ) ) ) ; context . setRaftPolicy ( createRaftPolicy ( false , true ) ) ; follower = createBehavior ( context ) ; org . opendaylight . controller . cluster . raft . behaviors . RaftActorBehavior newBehavior = follower . handleMessage ( leaderActor , appendEntries ) ; "<AssertPlaceHolder>" ; expectAndVerifyAppendEntriesReply ( 2 , false , context . getId ( ) , 1 , 2 , true ) ; } handleMessage ( java . lang . Object , akka . actor . ActorRef ) { if ( message instanceof org . opendaylight . controller . cluster . messaging . MessageSlice ) { org . opendaylight . controller . cluster . messaging . MessageAssembler . LOG . debug ( "{}:<sp>handleMessage:<sp>{}" , logContext , message ) ; onMessageSlice ( ( ( org . opendaylight . controller . cluster . messaging . MessageSlice ) ( message ) ) , sendTo ) ; return true ; } else if ( message instanceof org . opendaylight . controller . cluster . messaging . AbortSlicing ) { org . opendaylight . controller . cluster . messaging . MessageAssembler . LOG . debug ( "{}:<sp>handleMessage:<sp>{}" , logContext , message ) ; onAbortSlicing ( ( ( org . opendaylight . controller . cluster . messaging . AbortSlicing ) ( message ) ) ) ; return true ; } return false ; }
org . junit . Assert . assertSame ( follower , newBehavior )
testForUnSignedDoubleArray ( ) { java . lang . Double [ ] doubleArr = new java . lang . Double [ 2 ] ; doubleArr [ 0 ] = 1.9993 ; doubleArr [ 1 ] = 2.786 ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PUnsignedDouble . INSTANCE , doubleArr ) ; PUnsignedDoubleArray . INSTANCE . toObject ( arr , PUnsignedDoubleArray . INSTANCE ) ; byte [ ] bytes = PUnsignedDoubleArray . INSTANCE . toBytes ( arr ) ; org . apache . phoenix . schema . types . PhoenixArray resultArr = ( ( org . apache . phoenix . schema . types . PhoenixArray ) ( PUnsignedDoubleArray . INSTANCE . toObject ( bytes , 0 , bytes . length ) ) ) ; "<AssertPlaceHolder>" ; } toObject ( java . lang . Object , org . apache . phoenix . schema . types . PDataType , org . apache . phoenix . schema . SortOrder ) { return toObject ( object , actualType ) ; }
org . junit . Assert . assertEquals ( arr , resultArr )
testDereferenceElement ( ) { org . w3c . dom . Element referringElement = ( ( org . w3c . dom . Element ) ( wsattacker . library . xmlutilities . dom . DomUtilities . evaluateXPath ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20P , "//*[local-name()='element'<sp>and<sp>@ref='saml:Assertion']" ) . get ( 0 ) ) ) ; wsattacker . library . schemaanalyzer . SchemaAnalyzerImpl instance = new wsattacker . library . schemaanalyzer . SchemaAnalyzerImpl ( ) ; instance . appendSchema ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20P ) ; instance . appendSchema ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20 ) ; org . w3c . dom . Element expResult = ( ( org . w3c . dom . Element ) ( wsattacker . library . xmlutilities . dom . DomUtilities . evaluateXPath ( wsattacker . library . schemaanalyzer . SchemaAnalyzerTest . DOC_SAML20 , "//*[local-name()='element'<sp>and<sp>@name='Assertion']" ) . get ( 0 ) ) ) ; org . w3c . dom . Element result = instance . dereferenceElement ( referringElement ) ; "<AssertPlaceHolder>" ; } dereferenceElement ( org . w3c . dom . Element ) { org . w3c . dom . Element elementSchema = null ; java . lang . String ref = referringElement . getAttribute ( "ref" ) ; int colonPosition = ref . indexOf ( ':' ) ; if ( colonPosition > 0 ) { java . lang . String elementTypeLocalName = ref . substring ( ( colonPosition + 1 ) ) ; java . lang . String elementPrefix = ref . substring ( 0 , colonPosition ) ; java . lang . String elementNamespaceURI = wsattacker . library . xmlutilities . dom . DomUtilities . getNamespaceURI ( referringElement , elementPrefix ) ; elementSchema = findElementInSchema ( elementNamespaceURI , elementTypeLocalName ) ; } return elementSchema ; }
org . junit . Assert . assertEquals ( expResult , result )
testRawLdapConnection ( ) { final java . lang . String commonName = "Test<sp>person" ; final java . lang . String dn = java . lang . String . format ( "organizationalPerson" 0 , commonName ) ; org . sakaiproject . unboundid . LDAPConnection ldapConnection = embeddedLdapRule . unsharedLdapConnection ( ) ; try { ldapConnection . add ( new org . sakaiproject . unboundid . AddRequest ( dn , java . util . Arrays . asList ( new org . sakaiproject . unboundid . Attribute ( "objectclass" , "organizationalPerson" 1 , "organizationalPerson" 2 , "organizationalPerson" , "inetOrgPerson" ) , new org . sakaiproject . unboundid . Attribute ( "cn" , commonName ) , new org . sakaiproject . unboundid . Attribute ( "sn" , "Person" ) , new org . sakaiproject . unboundid . Attribute ( "uid" , "test" ) ) ) ) ; } finally { ldapConnection . close ( ) ; } ldapConnection = embeddedLdapRule . unsharedLdapConnection ( ) ; final org . sakaiproject . unboundid . SearchResultEntry entry = ldapConnection . searchForEntry ( new org . sakaiproject . unboundid . SearchRequest ( dn , SearchScope . BASE , "(objectClass=person)" ) ) ; "<AssertPlaceHolder>" ; } close ( ) { if ( ! ( m_locks . isEmpty ( ) ) ) { log . warn ( "close():<sp>locks<sp>remain!" ) ; } m_locks . clear ( ) ; m_locks = null ; }
org . junit . Assert . assertNotNull ( entry )
subscribes ( ) { "<AssertPlaceHolder>" ; } subscribes ( ) { org . junit . Assert . assertThat ( facebook . subscribes ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . SubscribeMethods . class ) ) ; }
org . junit . Assert . assertThat ( facebook . subscribes ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . SubscribeMethods . class ) )
checkUpdateEvents ( ) { for ( int i = 0 ; i < 21 ; i ++ ) { ICEFormEditor . notifyUpdateListeners ( ) ; "<AssertPlaceHolder>" ; testListener . reset ( ) ; } } wasUpdated ( ) { return updated ; }
org . junit . Assert . assertTrue ( testListener . wasUpdated ( ) )
getSetName ( ) { this . model . setName ( "the<sp>file" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "the<sp>file" , this . model . getName ( ) )
testDataSetRegistered ( ) { int count = presenter . getDataSetCount ( ) ; presenter . onDataSetDefRegisteredEvent ( new org . dashbuilder . dataset . events . DataSetDefRegisteredEvent ( null ) ) ; "<AssertPlaceHolder>" ; verify ( view ) . setDataSetCount ( ( count + 1 ) ) ; }
org . junit . Assert . assertEquals ( presenter . getDataSetCount ( ) , ( count + 1 ) )
failCase2 ( ) { org . openstack . atlas . api . validation . verifiers . VerifierResult result = hostNameVerifier . verify ( "*" ) ; "<AssertPlaceHolder>" ; } passed ( ) { return passed ; }
org . junit . Assert . assertFalse ( result . passed ( ) )
testUpload ( ) { logger . debug ( LinShareTestConstants . BEGIN_TEST ) ; java . lang . String fileName = "CAS.bin.export" ; java . nio . file . Path path = java . nio . file . Paths . get ( getClass ( ) . getClassLoader ( ) . getResource ( fileName ) . toURI ( ) ) ; java . io . File file = path . toFile ( ) ; org . linagora . linshare . core . domain . objects . FileMetaData metaData = new org . linagora . linshare . core . domain . objects . FileMetaData ( org . linagora . linshare . core . domain . constants . FileMetaDataKind . DATA , "application/octet-stream" , file . length ( ) , fileName ) ; org . linagora . linshare . core . domain . objects . FileMetaData data = jcloudFileDataStore . add ( file , metaData ) ; "<AssertPlaceHolder>" ; logger . info ( ( "FileMetaData<sp>:<sp>" + ( data . toString ( ) ) ) ) ; logger . debug ( LinShareTestConstants . END_TEST ) ; } add ( java . lang . String , java . lang . String ) { org . linagora . linshare . core . notifications . service . impl . MailBuildingServiceImpl . logger . debug ( ( ( ( ( "Adding<sp>K/V<sp>pair:<sp>[" + key ) + ",<sp>" ) + value ) + "]" ) ) ; super . put ( key , org . apache . commons . lang . StringUtils . defaultString ( value ) ) ; return this ; }
org . junit . Assert . assertNotNull ( data )
parsePublishOrUnpublishJson ( ) { doReturn ( parser ) . when ( underTest ) . npmPublishParserFor ( any ( com . fasterxml . jackson . core . JsonParser . class ) , eq ( storageFacet ) ) ; try ( org . sonatype . nexus . repository . npm . internal . NpmPublishRequest returnedRequest = underTest . parsePublish ( repository , payload ) ) { "<AssertPlaceHolder>" ; } } is ( java . lang . String ) { return org . sonatype . nexus . rapture . PasswordPlaceholder . VALUE . equals ( value ) ; }
org . junit . Assert . assertThat ( returnedRequest , org . hamcrest . Matchers . is ( request ) )
shouldMapAnnotation ( ) { java . lang . String table = uniqueString ( ) ; stubDefaultAnnotation ( table ) ; annis . model . Annotation actual = generator . mapAnnotation ( resultSet , tableAccessStrategy , table ) ; annis . model . Annotation expected = new annis . model . Annotation ( annis . sqlgen . AomAnnotateSqlGeneratorTest . NAMESPACE , annis . sqlgen . AomAnnotateSqlGeneratorTest . NAME , annis . sqlgen . AomAnnotateSqlGeneratorTest . VALUE ) ; "<AssertPlaceHolder>" ; } mapAnnotation ( java . sql . ResultSet , annis . sqlgen . TableAccessStrategy , java . lang . String ) { java . lang . String name = stringValue ( resultSet , table , "name" , tableAccessStrategy ) ; if ( resultSet . wasNull ( ) ) return null ; java . lang . String namespace = stringValue ( resultSet , table , "namespace" , tableAccessStrategy ) ; java . lang . String value = stringValue ( resultSet , table , "value" , tableAccessStrategy ) ; return new annis . model . Annotation ( namespace , name , value ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
testGetHealthNumber ( ) { java . lang . String expResult = "9267294685" ; java . lang . String result = stripe . getHealthNumber ( ) ; "<AssertPlaceHolder>" ; } getHealthNumber ( ) { return healthNumber ; }
org . junit . Assert . assertEquals ( expResult , result )
testStaticPropertyNonExistent ( ) { try { org . candlepin . util . PropertyUtil . getStaticPropertyAsString ( getClass ( ) , "BAR" ) ; org . junit . Assert . fail ( "BAR<sp>should've<sp>thrown<sp>exception" ) ; } catch ( java . lang . NoSuchFieldException e ) { "<AssertPlaceHolder>" ; } } getStaticPropertyAsString ( java . lang . Class , java . lang . String ) { java . lang . String value = null ; try { java . lang . reflect . Field f = clazz . getDeclaredField ( field ) ; if ( ( java . lang . reflect . Modifier . isStatic ( f . getModifiers ( ) ) ) && ( ( f . get ( clazz ) ) != null ) ) { value = f . get ( clazz ) . toString ( ) ; } } catch ( java . lang . SecurityException se ) { throw new java . lang . RuntimeException ( se . getMessage ( ) , se ) ; } catch ( java . lang . IllegalArgumentException iae ) { throw new java . lang . RuntimeException ( iae ) ; } catch ( java . lang . IllegalAccessException iae ) { throw new java . lang . RuntimeException ( iae ) ; } return value ; }
org . junit . Assert . assertTrue ( true )
testSetsVersionCheck ( ) { com . eclipsesource . tabris . VersionCheck check = mock ( com . eclipsesource . tabris . VersionCheck . class ) ; com . eclipsesource . tabris . TabrisClientInstaller . setVersionCheck ( check ) ; "<AssertPlaceHolder>" ; } setVersionCheck ( com . eclipsesource . tabris . VersionCheck ) { whenNull ( versionCheck ) . throwIllegalArgument ( "versionCheck<sp>must<sp>not<sp>be<sp>null" ) ; com . eclipsesource . tabris . TabrisClientInstaller . VERSION_CHECK = versionCheck ; }
org . junit . Assert . assertSame ( check , TabrisClientInstaller . VERSION_CHECK )
testVersion5NameBasedSHA1Different ( ) { java . util . Random random = new java . util . Random ( ) ; byte [ ] data = new byte [ 128 ] ; random . nextBytes ( data ) ; java . util . UUID a = com . twelvemonkeys . util . UUIDFactory . nameUUIDv5FromBytes ( data ) ; int i ; while ( ( data [ ( i = random . nextInt ( data . length ) ) ] ) == ( data [ ( ( ( data . length ) - 1 ) - i ) ] ) ) { } data [ i ] = data [ ( ( ( data . length ) - 1 ) - i ) ] ; java . util . UUID b = com . twelvemonkeys . util . UUIDFactory . nameUUIDv5FromBytes ( data ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( pOther instanceof com . twelvemonkeys . servlet . cache . WritableCachedResponse ) { return cachedResponse . equals ( ( ( com . twelvemonkeys . servlet . cache . WritableCachedResponse ) ( pOther ) ) . getCachedResponse ( ) ) ; } return cachedResponse . equals ( pOther ) ; }
org . junit . Assert . assertFalse ( a . equals ( b ) )
testCharInQualifier ( ) { createArtistsDataSet ( ) ; org . apache . cayenne . exp . Expression e = org . apache . cayenne . exp . ExpressionFactory . matchExp ( "artistName" , "artist1" ) ; org . apache . cayenne . query . SelectQuery q = new org . apache . cayenne . query . SelectQuery ( org . apache . cayenne . testdo . testmap . Artist . class , e ) ; java . util . List < org . apache . cayenne . testdo . testmap . Artist > artists = context . performQuery ( q ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , artists . size ( ) )
createFileUploadForFileSizeMax ( ) { long fileSizeMax = 100 ; java . lang . System . setProperty ( MultipartRequestHandler . FILE_SIZE_MAX_KEY , java . lang . String . valueOf ( fileSizeMax ) ) ; org . slim3 . controller . MultipartRequestHandler handler = new org . slim3 . controller . MultipartRequestHandler ( request ) ; org . slim3 . controller . upload . FileUpload upload = handler . createFileUpload ( ) ; "<AssertPlaceHolder>" ; } getFileSizeMax ( ) { return fileSizeMax ; }
org . junit . Assert . assertThat ( upload . getFileSizeMax ( ) , org . hamcrest . CoreMatchers . is ( fileSizeMax ) )
testAddParameterSingleValueMapWithParamByReplace ( ) { java . lang . String beforeUrl = ( com . feilong . core . net . paramutiltest . AddParameterSingleValueMapTest . PATH ) + "?a=b&city=12345&name=feilong" ; java . util . Map < java . lang . String , java . lang . String > singleValueMap = newLinkedHashMap ( ) ; singleValueMap . put ( "province" , "" ) ; singleValueMap . put ( "city" , "" ) ; java . lang . String expected = com . feilong . tools . slf4j . Slf4jUtil . format ( ( ( com . feilong . core . net . paramutiltest . AddParameterSingleValueMapTest . PATH ) + "?a=b&city={}&name=feilong&province={}" ) , com . feilong . core . net . URIUtil . encode ( "" , com . feilong . core . CharsetType . UTF8 ) , com . feilong . core . net . URIUtil . encode ( "" , com . feilong . core . CharsetType . UTF8 ) ) ; "<AssertPlaceHolder>" ; } addParameterSingleValueMap ( java . lang . String , java . util . Map , java . lang . String ) { return com . feilong . core . net . ParamUtil . addParameterArrayValueMap ( uriString , com . feilong . core . util . MapUtil . toArrayValueMap ( singleValueMap ) , charsetType ) ; }
org . junit . Assert . assertEquals ( expected , com . feilong . core . net . ParamUtil . addParameterSingleValueMap ( beforeUrl , singleValueMap , com . feilong . core . CharsetType . UTF8 ) )
testGetValueWithTimestampEqual ( ) { java . lang . String expectedValue = "Some<sp>value" ; com . hazelcast . hibernate . serialization . Value value = new com . hazelcast . hibernate . serialization . Value ( null , 100L , expectedValue ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expectedValue , value . getValue ( 100L ) )
factoryShouldReturnDiskBasedCache ( ) { com . android . volley . Cache diskCache = com . navercorp . volleyextensions . volleyer . factory . DefaultRequestQueueFactory . getDefaultDiskCache ( context ) ; "<AssertPlaceHolder>" ; } getDefaultDiskCache ( android . content . Context ) { java . io . File cacheDir = com . navercorp . volleyextensions . volleyer . factory . DefaultRequestQueueFactory . getCacheDir ( context ) ; if ( cacheDir == null ) { return new com . android . volley . toolbox . NoCache ( ) ; } return new com . android . volley . toolbox . DiskBasedCache ( cacheDir ) ; }
org . junit . Assert . assertEquals ( diskCache . getClass ( ) , com . android . volley . toolbox . DiskBasedCache . class )
isButtonEnabled_Succeed ( ) { givenAnyPeriodAndType ( ) ; model . setAvailableOperations ( generateAvailableOperations ( ) ) ; boolean isEnabled = ctrl . isButtonEnabled ( ) ; "<AssertPlaceHolder>" ; } isButtonEnabled ( ) { return ( ( getSelectedMarketplace ( ) ) != null ) && ( ( getSelectedMarketplace ( ) . length ( ) ) > 0 ) ; }
org . junit . Assert . assertTrue ( isEnabled )
testJmsConnectionIdFromJmsConnectionId ( ) { org . apache . qpid . jms . meta . JmsConnectionId id1 = new org . apache . qpid . jms . meta . JmsConnectionId ( firstId ) ; org . apache . qpid . jms . meta . JmsConnectionId id2 = new org . apache . qpid . jms . meta . JmsConnectionId ( id1 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertSame ( id1 . getValue ( ) , id2 . getValue ( ) )
testArrayPropertyNullToNullNotDirty ( ) { org . nuxeo . ecm . core . api . model . impl . ArrayProperty property = getArrayProperty ( ) ; property . setValue ( null ) ; property . clearDirtyFlags ( ) ; property . setValue ( null ) ; "<AssertPlaceHolder>" ; } isDirty ( ) { return ( ( listDiff ) != null ) && ( listDiff . isDirty ( ) ) ; }
org . junit . Assert . assertFalse ( property . isDirty ( ) )