input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testTimestamp ( ) { ch . yax . hive . udf . number . Timestamp timestamp = new ch . yax . hive . udf . number . Timestamp ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { ( count ) ++ ; return count ; }
|
org . junit . Assert . assertNotNull ( timestamp . evaluate ( ) )
|
test ( ) { java . io . File subFolder = folder . newFolder ( ) ; java . util . Set < java . nio . file . attribute . PosixFilePermission > permissions = new java . util . HashSet ( ) ; permissions . add ( PosixFilePermission . OWNER_READ ) ; permissions . add ( PosixFilePermission . OWNER_WRITE ) ; permissions . add ( PosixFilePermission . OWNER_EXECUTE ) ; permissions . add ( PosixFilePermission . GROUP_READ ) ; permissions . add ( PosixFilePermission . GROUP_EXECUTE ) ; java . nio . file . Files . setPosixFilePermissions ( subFolder . toPath ( ) , permissions ) ; s . setPermissions ( argument ) ; "<AssertPlaceHolder>" ; } isSelected ( java . io . File , java . lang . String , java . io . File ) { init ( ) ; setSelected ( true ) ; this . file = file ; this . basedir = basedir ; this . filename = filename ; runner . addBean ( "basedir" , basedir ) ; runner . addBean ( "filename" , filename ) ; runner . addBean ( "file" , file ) ; runner . executeScript ( "ant_selector" ) ; return isSelected ( ) ; }
|
org . junit . Assert . assertTrue ( s . isSelected ( null , null , subFolder ) )
|
testSetRow ( ) { org . apache . commons . math4 . linear . RealMatrix m = new org . apache . commons . math4 . linear . BlockRealMatrix ( subTestData ) ; "<AssertPlaceHolder>" ; m . setRow ( 0 , subRow3 [ 0 ] ) ; checkArrays ( subRow3 [ 0 ] , m . getRow ( 0 ) ) ; try { m . setRow ( ( - 1 ) , subRow3 [ 0 ] ) ; org . junit . Assert . fail ( "Expecting<sp>OutOfRangeException" ) ; } catch ( org . apache . commons . math4 . exception . OutOfRangeException ex ) { } try { m . setRow ( 0 , new double [ 5 ] ) ; org . junit . Assert . fail ( "Expecting<sp>MatrixDimensionMismatchException" ) ; } catch ( org . apache . commons . math4 . linear . MatrixDimensionMismatchException ex ) { } } getRow ( int ) { org . apache . commons . math4 . linear . MatrixUtils . checkRowIndex ( this , row ) ; final int nCols = getColumnDimension ( ) ; final double [ ] out = new double [ nCols ] ; for ( int i = 0 ; i < nCols ; ++ i ) { out [ i ] = getEntry ( row , i ) ; } return out ; }
|
org . junit . Assert . assertTrue ( ( ( subRow3 [ 0 ] [ 0 ] ) != ( m . getRow ( 0 ) [ 0 ] ) ) )
|
testSuitableIfCacheEntryIsHeuristicallyFreshEnough ( ) { final java . util . Date oneSecondAgo = new java . util . Date ( ( ( now . getTime ( ) ) - ( 1 * 1000L ) ) ) ; final java . util . Date twentyOneSecondsAgo = new java . util . Date ( ( ( now . getTime ( ) ) - ( 21 * 1000L ) ) ) ; final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( oneSecondAgo ) ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Last-Modified" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( twentyOneSecondsAgo ) ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Content-Length" , "128" ) } ; entry = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . makeCacheEntry ( oneSecondAgo , oneSecondAgo , headers ) ; final org . apache . hc . client5 . http . impl . cache . CacheConfig config = org . apache . hc . client5 . http . impl . cache . CacheConfig . custom ( ) . setHeuristicCachingEnabled ( true ) . setHeuristicCoefficient ( 0.1F ) . build ( ) ; impl = new org . apache . hc . client5 . http . impl . cache . CachedResponseSuitabilityChecker ( config ) ; "<AssertPlaceHolder>" ; } canCachedResponseBeUsed ( org . apache . hc . core5 . http . HttpHost , org . apache . hc . core5 . http . HttpRequest , org . apache . hc . client5 . http . cache . HttpCacheEntry , java . util . Date ) { if ( ! ( isFreshEnough ( entry , request , now ) ) ) { log . debug ( "Cache<sp>entry<sp>is<sp>not<sp>fresh<sp>enough" ) ; return false ; } if ( ( isGet ( request ) ) && ( ! ( validityStrategy . contentLengthHeaderMatchesActualLength ( entry ) ) ) ) { log . debug ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 1 ) ; return false ; } if ( hasUnsupportedConditionalHeaders ( request ) ) { log . debug ( "Request<sp>contains<sp>unsupported<sp>conditional<sp>headers" ) ; return false ; } if ( ( ! ( isConditional ( request ) ) ) && ( ( entry . getStatus ( ) ) == ( org . apache . hc . core5 . http . HttpStatus . SC_NOT_MODIFIED ) ) ) { log . debug ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 2 ) ; return false ; } if ( ( isConditional ( request ) ) && ( ! ( allConditionalsMatch ( request , entry , now ) ) ) ) { log . debug ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" ) ; return false ; } if ( hasUnsupportedCacheEntryForGet ( request , entry ) ) { log . debug ( ( "HEAD<sp>response<sp>caching<sp>enabled<sp>but<sp>the<sp>cache<sp>entry<sp>does<sp>not<sp>contain<sp>a<sp>" + "request<sp>method,<sp>entity<sp>or<sp>a<sp>204<sp>response" ) ) ; return false ; } final java . util . Iterator < org . apache . hc . core5 . http . HeaderElement > it = org . apache . hc . core5 . http . message . MessageSupport . iterate ( request , HeaderConstants . CACHE_CONTROL ) ; while ( it . hasNext ( ) ) { final org . apache . hc . core5 . http . HeaderElement elt = it . next ( ) ; if ( HeaderConstants . CACHE_CONTROL_NO_CACHE . equals ( elt . getName ( ) ) ) { log . debug ( "Response<sp>contained<sp>NO<sp>CACHE<sp>directive,<sp>cache<sp>was<sp>not<sp>suitable" ) ; return false ; } if ( HeaderConstants . CACHE_CONTROL_NO_STORE . equals ( elt . getName ( ) ) ) { log . debug ( "Response<sp>contained<sp>NO<sp>STORE<sp>directive,<sp>cache<sp>was<sp>not<sp>suitable" ) ; return false ; } if ( HeaderConstants . CACHE_CONTROL_MAX_AGE . equals ( elt . getName ( ) ) ) { try { final int maxage = java . lang . Integer . parseInt ( elt . getValue ( ) ) ; if ( ( validityStrategy . getCurrentAgeSecs ( entry , now ) ) > maxage ) { log . debug ( "Response<sp>from<sp>cache<sp>was<sp>NOT<sp>suitable<sp>due<sp>to<sp>max<sp>age" ) ; return false ; } } catch ( final java . lang . NumberFormatException ex ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 4 + ( ex . getMessage ( ) ) ) ) ; return false ; } } if ( HeaderConstants . CACHE_CONTROL_MAX_STALE . equals ( elt . getName ( ) ) ) { try { final int maxstale = java . lang . Integer . parseInt ( elt . getValue ( ) ) ; if ( ( validityStrategy . getFreshnessLifetimeSecs ( entry ) ) > maxstale ) { log . debug ( "Response<sp>from<sp>cache<sp>was<sp>not<sp>suitable<sp>due<sp>to<sp>Max<sp>stale<sp>freshness" ) ; return false ; } } catch ( final java . lang . NumberFormatException ex ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 3 + ( ex . getMessage ( ) ) ) ) ; return false ; } } if ( HeaderConstants . CACHE_CONTROL_MIN_FRESH . equals ( elt . getName ( ) ) ) { try { final long minfresh = java . lang . Long . parseLong ( elt . getValue ( ) ) ; if ( minfresh < 0L ) { return false ; } final long age = validityStrategy . getCurrentAgeSecs ( entry , now ) ; final long freshness = validityStrategy . getFreshnessLifetimeSecs ( entry ) ; if ( ( freshness - age ) < minfresh ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 0 + "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 5 ) ) ; return false ; } } catch ( final java . lang . NumberFormatException ex ) { log . debug ( ( "Conditional<sp>request<sp>and<sp>with<sp>mismatched<sp>conditions" 3 + ( ex . getMessage ( ) ) ) ) ; return false ; } } } log . debug ( "Response<sp>from<sp>cache<sp>was<sp>suitable" )
|
org . junit . Assert . assertTrue ( impl . canCachedResponseBeUsed ( host , request , entry , now ) )
|
cloneAsVersionTest ( ) { final org . opendaylight . controller . cluster . access . commands . TransactionCommitSuccess clone = org . opendaylight . controller . cluster . access . commands . TransactionCommitSuccessTest . OBJECT . cloneAsVersion ( ABIVersion . BORON ) ; "<AssertPlaceHolder>" ; } cloneAsVersion ( org . opendaylight . controller . cluster . access . ABIVersion ) { return ( ( T ) ( this ) ) ; }
|
org . junit . Assert . assertEquals ( org . opendaylight . controller . cluster . access . commands . TransactionCommitSuccessTest . OBJECT , clone )
|
testCorrectHeaderParameter ( ) { com . ibm . ws . microprofile . openapi . impl . validation . ParameterValidator validator = com . ibm . ws . microprofile . openapi . impl . validation . ParameterValidator . getInstance ( ) ; com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper vh = new com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper ( ) ; com . ibm . ws . microprofile . openapi . impl . model . parameters . ParameterImpl parameter = new com . ibm . ws . microprofile . openapi . impl . model . parameters . ParameterImpl ( ) ; com . ibm . ws . microprofile . openapi . impl . model . media . ContentImpl content = new com . ibm . ws . microprofile . openapi . impl . model . media . ContentImpl ( ) ; com . ibm . ws . microprofile . openapi . impl . model . media . MediaTypeImpl mediaType = new com . ibm . ws . microprofile . openapi . impl . model . media . MediaTypeImpl ( ) ; content . addMediaType ( "param-content" , mediaType ) ; parameter . name ( "Accept" ) . in ( In . HEADER ) . content ( content ) ; validator . validate ( vh , context , key , parameter ) ; "<AssertPlaceHolder>" ; } getEventsSize ( ) { return result . getEvents ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) )
|
areControlActProcessFieldsNullWhenQueryByParameterNull ( ) { boolean result ; org . hl7 . v3 . PRPAIN201305UV02 oRequest = new org . hl7 . v3 . PRPAIN201305UV02 ( ) ; org . hl7 . v3 . PRPAIN201305UV02QUQIMT021001UV01ControlActProcess controlActProcess = new org . hl7 . v3 . PRPAIN201305UV02QUQIMT021001UV01ControlActProcess ( ) ; oRequest . setControlActProcess ( controlActProcess ) ; gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms transforms = new gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms ( ) ; result = transforms . areControlActProcessFieldsNull ( oRequest ) ; "<AssertPlaceHolder>" ; } areControlActProcessFieldsNull ( org . hl7 . v3 . PRPAIN201305UV02 ) { if ( ( oRequest . getControlActProcess ( ) ) == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms . LOG . error ( "The<sp>controlActProcess<sp>object<sp>from<sp>the<sp>incomming<sp>request<sp>message<sp>is<sp>null." ) ; return true ; } else if ( ( oRequest . getControlActProcess ( ) . getQueryByParameter ( ) ) == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms . LOG . error ( "The<sp>JAXB<sp>queryByParameter<sp>object<sp>in<sp>the<sp>request's<sp>controlActProcess<sp>object<sp>is<sp>null." ) ; return true ; } else if ( ( oRequest . getControlActProcess ( ) . getQueryByParameter ( ) . getValue ( ) ) == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms . LOG . error ( "The<sp>queryByParameter<sp>object<sp>in<sp>the<sp>request's<sp>controlActProcess<sp>object<sp>is<sp>null." ) ; return true ; } else if ( ( oRequest . getControlActProcess ( ) . getQueryByParameter ( ) . getValue ( ) . getQueryId ( ) ) == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7PRPA201306Transforms . LOG . error ( "The<sp>queryId<sp>object<sp>in<sp>the<sp>request's<sp>controlActProcess<sp>object<sp>is<sp>null." ) ; return true ; } return false ; }
|
org . junit . Assert . assertTrue ( result )
|
determinePriceModelType_Template ( ) { org . oscm . domobjects . PriceModel pm = givenPriceModel ( ServiceType . TEMPLATE ) ; org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogOperation . PriceModelType type = logCollector . determinePriceModelType ( pm ) ; "<AssertPlaceHolder>" ; } determinePriceModelType ( org . oscm . domobjects . PriceModel ) { org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogOperation . PriceModelType priceModelType = org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogOperation . PriceModelType . SERVICE ; if ( org . oscm . internal . types . enumtypes . ServiceType . isSubscription ( priceModel . getProduct ( ) . getType ( ) ) ) { priceModelType = org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogOperation . PriceModelType . SUBSCRIPTION ; } else if ( org . oscm . internal . types . enumtypes . ServiceType . isCustomerTemplate ( priceModel . getProduct ( ) . getType ( ) ) ) { priceModelType = org . oscm . serviceprovisioningservice . auditlog . PriceModelAuditLogOperation . PriceModelType . CUSTOMER_SERVICE ; } return priceModelType ; }
|
org . junit . Assert . assertEquals ( PriceModelType . SERVICE , type )
|
s3ServerSideEncryption ( ) { com . hotels . bdp . circustrain . s3mapreducecp . S3MapReduceCpOptions options = new com . hotels . bdp . circustrain . s3mapreducecp . OptionsParser ( ) . parse ( "--src" , "hdfs://localhost:8020/source/first" , "--dest" , "hdfs://localhost:8020/target/" , "--credentialsProvider" , "jceks://hdfs@localhost:8020/security/credentials.jceks" , "--s3ServerSideEncryption" ) ; "<AssertPlaceHolder>" ; } isS3ServerSideEncryption ( ) { return s3ServerSideEncryption ; }
|
org . junit . Assert . assertThat ( options . isS3ServerSideEncryption ( ) , org . hamcrest . CoreMatchers . is ( true ) )
|
testCompareVersionNewMajor ( ) { java . lang . String Version1 = "1.1.1" ; java . lang . String Version2 = "2.1.1" ; "<AssertPlaceHolder>" ; } compareVersions ( java . lang . String , java . lang . String ) { return de . jonato . jfxc . info . Version . compareVersions ( version1 , version2 , de . jonato . jfxc . info . Version . VERSION_SPLIT ) ; }
|
org . junit . Assert . assertTrue ( ( ( de . jonato . jfxc . info . Version . compareVersions ( Version1 , Version2 ) ) < 0 ) )
|
testPrintWriter ( ) { java . lang . String file = "PrintWriter_file.tmp" ; java . lang . String expected = "testPrintWriter" ; org . evosuite . runtime . mock . java . io . MockPrintWriter out = new org . evosuite . runtime . mock . java . io . MockPrintWriter ( file ) ; out . println ( expected ) ; out . close ( ) ; java . util . Scanner in = new java . util . Scanner ( new org . evosuite . runtime . mock . java . io . MockFileInputStream ( file ) ) ; java . lang . String result = in . nextLine ( ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { }
|
org . junit . Assert . assertEquals ( expected , result )
|
postOnlyWithModeratorOnlineModeratorIsOfflineShouldDeny ( ) { when ( request . getParameter ( "topic.forum.id" ) ) . thenReturn ( "1" ) ; when ( userSession . isLogged ( ) ) . thenReturn ( true ) ; when ( roleManager . isForumAllowed ( 1 ) ) . thenReturn ( true ) ; when ( roleManager . isForumReadOnly ( 1 ) ) . thenReturn ( false ) ; when ( roleManager . getPostOnlyWithModeratorOnline ( ) ) . thenReturn ( true ) ; when ( sessionManager . isModeratorOnline ( ) ) . thenReturn ( false ) ; when ( forumRepository . get ( 1 ) ) . thenReturn ( new net . jforum . entities . Forum ( ) ) ; "<AssertPlaceHolder>" ; } shouldProceed ( net . jforum . entities . UserSession , javax . servlet . http . HttpServletRequest ) { int userId = this . findUserId ( request ) ; boolean logged = userSession . isLogged ( ) ; if ( ! logged ) { return false ; } net . jforum . entities . User currentUser = userSession . getUser ( ) ; if ( ( currentUser . getId ( ) ) == userId ) { return true ; } net . jforum . entities . User user = userRepository . get ( userId ) ; return userSession . getRoleManager ( ) . getCanEditUser ( user , currentUser . getGroups ( ) ) ; }
|
org . junit . Assert . assertFalse ( rule . shouldProceed ( userSession , request ) )
|
test_multipliedBy_BigDecimal_one ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . multipliedBy ( BigDecimal . ONE ) ; "<AssertPlaceHolder>" ; } multipliedBy ( long ) { return with ( money . multipliedBy ( valueToMultiplyBy ) ) ; }
|
org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test )
|
fixedVariable ( ) { try ( org . apache . arrow . vector . IntVector col1 = new org . apache . arrow . vector . IntVector ( "col1" , allocator ) ; org . apache . arrow . vector . BigIntVector col2 = new org . apache . arrow . vector . BigIntVector ( "col2" , allocator ) ; org . apache . arrow . vector . VarCharVector col3 = new org . apache . arrow . vector . VarCharVector ( "col3" , allocator ) ) { com . dremio . sabot . op . common . ht2 . PivotDef pivot = com . dremio . sabot . op . common . ht2 . PivotBuilder . getBlockDefinition ( new com . dremio . sabot . op . common . ht2 . FieldVectorPair ( col1 , col1 ) , new com . dremio . sabot . op . common . ht2 . FieldVectorPair ( col2 , col2 ) , new com . dremio . sabot . op . common . ht2 . FieldVectorPair ( col3 , col3 ) ) ; java . lang . Integer [ ] col1Val = com . dremio . sabot . op . common . ht2 . TestBoundedPivots . populate4ByteValues ( col1 , 4096 ) ; java . lang . Long [ ] col2Val = com . dremio . sabot . op . common . ht2 . TestBoundedPivots . populate8ByteValues ( col2 , 4096 ) ; java . lang . String [ ] col3Val = com . dremio . sabot . op . common . ht2 . TestBoundedPivots . populateVarCharValues ( col3 , 4096 ) ; "<AssertPlaceHolder>" ; try ( com . dremio . sabot . op . common . ht2 . FixedBlockVector fixed = new com . dremio . sabot . op . common . ht2 . FixedBlockVector ( allocator , pivot . getBlockWidth ( ) , 4096 , true ) ; com . dremio . sabot . op . common . ht2 . VariableBlockVector variable = new com . dremio . sabot . op . common . ht2 . VariableBlockVector ( allocator , pivot . getVariableCount ( ) , ( 4096 * 2 ) , true ) ) { fixedVariableHelper ( pivot , fixed , variable , 0 , 4096 , false , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 0 , 128 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 0 , 17 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 0 , 76 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 5 , 39 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 5 , 189 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 5 , 123 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 0 , 1023 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 1023 , 1023 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 2046 , 1023 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 3069 , 1023 , true , col1Val , col2Val , col3Val ) ; fixedVariableHelper ( pivot , fixed , variable , 4092 , 4 , true , col1Val , col2Val , col3Val ) ; } } } getBlockWidth ( ) { return blockWidth ; }
|
org . junit . Assert . assertEquals ( 20 , pivot . getBlockWidth ( ) )
|
shouldHaveStaticComponentId ( ) { java . lang . String componentId = this . h . getId ( ) ; this . h . setId ( "madeup" ) ; "<AssertPlaceHolder>" ; } getId ( ) { return org . springframework . springfaces . mvc . model . SpringFacesModelHolder . COMPONENT_ID ; }
|
org . junit . Assert . assertThat ( this . h . getId ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( componentId ) ) )
|
getColorThemeFromSkinFileWithOtherSkinAndException ( ) { java . lang . Exception exception = new org . xwiki . lesscss . compiler . LESSCompilerException ( "Exception<sp>with<sp>LESS" , null ) ; when ( lessColorThemeConverter . getColorThemeFromSkinFile ( "style.less" , "flamingo" , false ) ) . thenThrow ( exception ) ; org . xwiki . lesscss . internal . colortheme . ColorTheme result = mocker . getComponentUnderTest ( ) . getColorThemeFromSkinFile ( "style.less" , "flamingo" ) ; "<AssertPlaceHolder>" ; } size ( ) { return groupNames . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testGetString ( ) { java . sql . PreparedStatement preparedStatement = createMock ( java . sql . PreparedStatement . class ) ; java . sql . ResultSet resultSet = createMock ( java . sql . ResultSet . class ) ; int colN = 120 ; java . lang . String val = "zippy" ; expect ( resultSet . getMetaData ( ) ) . andReturn ( null ) ; expect ( resultSet . getString ( ( colN + 1 ) ) ) . andReturn ( val ) ; resultSet . close ( ) ; replay ( preparedStatement , resultSet ) ; com . j256 . ormlite . jdbc . JdbcDatabaseResults results = new com . j256 . ormlite . jdbc . JdbcDatabaseResults ( preparedStatement , resultSet , null , false ) ; "<AssertPlaceHolder>" ; results . close ( ) ; verify ( preparedStatement , resultSet ) ; } getString ( int ) { return resultSet . getString ( ( columnIndex + 1 ) ) ; }
|
org . junit . Assert . assertEquals ( val , results . getString ( colN ) )
|
testLastWithoutList ( ) { final org . apache . calcite . linq4j . Enumerable < java . lang . String > enumerable = org . apache . calcite . linq4j . Linq4j . asEnumerable ( java . util . Collections . unmodifiableCollection ( java . util . Arrays . asList ( "jimi" , "noel" , "mitch" ) ) ) ; "<AssertPlaceHolder>" ; } last ( ) { return org . apache . calcite . linq4j . EnumerableDefaults . last ( getThis ( ) ) ; }
|
org . junit . Assert . assertEquals ( "mitch" , enumerable . last ( ) )
|
test_getParameterName ( ) { ch . puzzle . itc . mobiliar . business . deploy . entity . CustomFilter c = ch . puzzle . itc . mobiliar . business . deploy . entity . CustomFilter . builder ( specialFilterType ) . filterDisplayName ( "filterDisplayName" ) . deploymentTableColumnName ( "deploymentTableColumnName" ) . build ( ) ; c . setComparatorSelection ( ComparatorFilterOption . eq ) ; java . lang . String parameterName = c . getParameterName ( ) ; "<AssertPlaceHolder>" ; } getParameterName ( ) { return this . filterDisplayName . replaceAll ( "<sp>" , "" ) ; }
|
org . junit . Assert . assertEquals ( "filterDisplayName" , parameterName )
|
testStringListViaReflection ( ) { org . cache2k . configuration . CacheTypeCapture < java . util . List < java . lang . String > > vtt = new org . cache2k . configuration . CacheTypeCapture < java . util . List < java . lang . String > > ( ) { } ; java . lang . reflect . ParameterizedType pt = ( ( java . lang . reflect . ParameterizedType ) ( vtt . getClass ( ) . getGenericSuperclass ( ) ) ) ; java . lang . reflect . ParameterizedType t = ( ( java . lang . reflect . ParameterizedType ) ( pt . getActualTypeArguments ( ) [ 0 ] ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( java . lang . String . class , t . getActualTypeArguments ( ) [ 0 ] )
|
testBadInstanciation ( ) { org . orbisgis . coremap . renderer . se . Style s = getStyle ( org . orbisgis . legend . thematic . categorize . AREA_RECODE ) ; org . orbisgis . coremap . renderer . se . AreaSymbolizer as = ( ( org . orbisgis . coremap . renderer . se . AreaSymbolizer ) ( s . getRules ( ) . get ( 0 ) . getCompositeSymbolizer ( ) . getChildren ( ) . get ( 0 ) ) ) ; try { org . orbisgis . legend . thematic . categorize . CategorizedArea ca = new org . orbisgis . legend . thematic . categorize . CategorizedArea ( as ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException iae ) { "<AssertPlaceHolder>" ; } } get ( java . lang . Object ) { if ( ! ( o instanceof java . lang . Double ) ) { throw new java . lang . IllegalArgumentException ( "Keys<sp>are<sp>double<sp>values<sp>in<sp>this<sp>map" ) ; } java . lang . Double d = ( ( java . lang . Double ) ( o ) ) ; return new org . orbisgis . legend . thematic . LineParameters ( color . getFromLower ( d ) , opacity . getFromLower ( d ) , width . getFromLower ( d ) , dash . getFromLower ( d ) ) ; }
|
org . junit . Assert . assertTrue ( true )
|
testGrandparentWithoutObjectTrueCondition ( ) { io . yawp . repository . models . parents . Parent parent = saveParent ( "parent" ) ; saveGrandchild ( "granchild" , saveChild ( "child" , parent ) ) ; io . yawp . repository . shields . RuleConditions conditions = new io . yawp . repository . shields . RuleConditions ( yawp , io . yawp . repository . models . parents . Grandchild . class , parent . getId ( ) , null ) ; conditions . where ( c ( "name" , "=" , "granchild" ) ) ; conditions . and ( c ( "parent->name" , "=" , "child" ) ) ; conditions . and ( c ( "parent->parent->name" , "=" , "parent" ) ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { initConditions ( ) ; return ( evaluateIncoming ( ) ) && ( evaluateExisting ( ) ) ; }
|
org . junit . Assert . assertTrue ( conditions . evaluate ( ) )
|
testEncodeDecodeHeaders ( ) { java . util . Map < java . lang . String , java . lang . String > headers = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "foo" , "bar" ) ; } } ; io . netty . buffer . ByteBuf binaryHeaders = serializer . encodeHeaders ( headers ) ; java . util . Map < java . lang . String , java . lang . String > decodedHeaders = serializer . decodeHeaders ( binaryHeaders ) ; "<AssertPlaceHolder>" ; binaryHeaders . release ( ) ; } decodeHeaders ( io . netty . buffer . ByteBuf ) { int numHeaders = buffer . readUnsignedShort ( ) ; java . util . Map < java . lang . String , java . lang . String > headers = com . google . common . collect . Maps . newHashMapWithExpectedSize ( numHeaders ) ; for ( int i = 0 ; i < numHeaders ; i ++ ) { java . lang . String key = com . uber . tchannel . codecs . CodecUtils . decodeString ( buffer ) ; java . lang . String value = com . uber . tchannel . codecs . CodecUtils . decodeString ( buffer ) ; headers . put ( key , value ) ; } return headers ; }
|
org . junit . Assert . assertEquals ( headers , decodedHeaders )
|
testGetValueReturnsTheValueAdded ( ) { final com . lmax . simpledsl . SimpleDslParam param = new com . lmax . simpledsl . SimpleDslParamTest . TestParam ( "foo" ) ; param . addValue ( "12" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { if ( allowMultipleValues ) { throw new java . lang . IllegalArgumentException ( "getValues()<sp>should<sp>be<sp>used<sp>when<sp>multiple<sp>values<sp>are<sp>allowed" ) ; } final java . lang . String [ ] strings = getValues ( ) ; return ( strings . length ) > 0 ? strings [ 0 ] : null ; }
|
org . junit . Assert . assertEquals ( "12" , param . getValue ( ) )
|
phases ( ) { com . asakusafw . workflow . model . basic . BasicJobflowInfo jobflow = new com . asakusafw . workflow . model . basic . BasicJobflowInfo ( context . getFlowId ( ) ) ; jobflow . addTask ( TaskInfo . Phase . INITIALIZE , new com . asakusafw . workflow . executor . MockTaskInfo ( "A" ) ) ; jobflow . addTask ( TaskInfo . Phase . IMPORT , new com . asakusafw . workflow . executor . MockTaskInfo ( "B" ) ) ; jobflow . addTask ( TaskInfo . Phase . PROLOGUE , new com . asakusafw . workflow . executor . MockTaskInfo ( "C" ) ) ; jobflow . addTask ( TaskInfo . Phase . MAIN , new com . asakusafw . workflow . executor . MockTaskInfo ( "D" ) ) ; jobflow . addTask ( TaskInfo . Phase . EPILOGUE , new com . asakusafw . workflow . executor . MockTaskInfo ( "E" ) ) ; jobflow . addTask ( TaskInfo . Phase . EXPORT , new com . asakusafw . workflow . executor . MockTaskInfo ( "F" ) ) ; jobflow . addTask ( TaskInfo . Phase . FINALIZE , new com . asakusafw . workflow . executor . MockTaskInfo ( "G" ) ) ; jobflow . addTask ( TaskInfo . Phase . CLEANUP , new com . asakusafw . workflow . executor . MockTaskInfo ( "H" ) ) ; com . asakusafw . workflow . executor . MockExecutor e0 = new com . asakusafw . workflow . executor . MockExecutor ( ( t ) -> true ) ; com . asakusafw . workflow . executor . JobflowExecutor executor = new com . asakusafw . workflow . executor . basic . BasicJobflowExecutor ( e0 ) ; executor . execute ( context , jobflow ) ; "<AssertPlaceHolder>" ; } getValues ( ) { return values ; }
|
org . junit . Assert . assertThat ( e0 . getValues ( ) , contains ( "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" ) )
|
should_return_this ( ) { org . fest . assertions . api . CharacterAssert returned = assertions . isEqualTo ( actual ) ; "<AssertPlaceHolder>" ; } isEqualTo ( byte ) { bytes . assertEqualTo ( description , actual , expected ) ; return this ; }
|
org . junit . Assert . assertSame ( assertions , returned )
|
testAddPutsValue ( ) { com . eclipsesource . tabris . internal . ClientStoreImpl store = new com . eclipsesource . tabris . internal . ClientStoreImpl ( ) ; store . add ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { whenNull ( shortcut ) . throwIllegalArgument ( "shortcut<sp>must<sp>not<sp>be<sp>null" ) ; when ( shortcut . isEmpty ( ) ) . throwIllegalArgument ( "shortcut<sp>must<sp>not<sp>be<sp>empty" ) ; org . eclipse . rap . json . JsonValue jsonValue = data . get ( shortcut ) ; if ( jsonValue != null ) { return jsonValue . asString ( ) ; } return null ; }
|
org . junit . Assert . assertEquals ( "bar" , store . get ( "foo" ) )
|
testSerializationIsThreadSafe ( ) { scheduler = new org . eclipse . swt . widgets . TimerExecScheduler ( display ) ; java . lang . Runnable runnable = new java . lang . Runnable ( ) { public void run ( ) { try { scheduler . schedule ( 1 , new org . eclipse . rap . rwt . testfixture . internal . NoOpRunnable ( ) ) ; } catch ( java . lang . Throwable thr ) { exceptions . add ( thr ) ; } } } ; java . lang . Thread [ ] threads = startThreads ( 10 , runnable ) ; for ( int i = 0 ; i < 5 ; i ++ ) { serialize ( scheduler ) ; } joinThreads ( threads ) ; "<AssertPlaceHolder>" ; } size ( ) { return new org . eclipse . jface . internal . databinding . swt . ControlSizeProperty ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , exceptions . size ( ) )
|
testGetStyleForMetacardBooleanAttribute ( ) { ddf . catalog . data . Metacard metacard = new org . codice . ddf . spatial . kml . transformer . MockMetacard ( AttributeFormat . BOOLEAN . toString ( ) , true ) ; org . codice . ddf . spatial . kml . transformer . KmlStyleMap mapper = new org . codice . ddf . spatial . kml . transformer . KmlStyleMap ( ) ; mapper . addMapEntry ( new org . codice . ddf . spatial . kml . transformer . KmlStyleMapEntryImpl ( AttributeFormat . BOOLEAN . toString ( ) , java . lang . String . valueOf ( true ) , org . codice . ddf . spatial . kml . transformer . KmlStyleMapTest . DEFAULT_STYLE_URL ) ) ; "<AssertPlaceHolder>" ; } getStyleForMetacard ( ddf . catalog . data . Metacard ) { for ( org . codice . ddf . spatial . kml . transformer . KmlStyleMapEntry mapEntry : styleMap ) { if ( mapEntry . metacardMatch ( metacard ) ) { return mapEntry . getStyleUrl ( ) ; } } return "" ; }
|
org . junit . Assert . assertThat ( mapper . getStyleForMetacard ( metacard ) , org . hamcrest . Matchers . is ( org . codice . ddf . spatial . kml . transformer . KmlStyleMapTest . DEFAULT_STYLE_URL ) )
|
testDismissCache_flipIntRange ( ) { org . roaringbitmap . FastRankRoaringBitmap fast = prepareFastWithComputedCache ( ) ; fast . flip ( 0L , 2 ) ; "<AssertPlaceHolder>" ; } isCacheDismissed ( ) { return ! ( cumulatedCardinalitiesCacheIsValid ) ; }
|
org . junit . Assert . assertTrue ( fast . isCacheDismissed ( ) )
|
testNullString ( ) { final java . sql . PreparedStatement ps = connection . prepareStatement ( "SELECT<sp>null<sp>as<sp>str" ) ; final java . sql . ResultSet rs = ps . executeQuery ( ) ; final com . typemapper . core . TypeMapper < ? > mapper = com . typemapper . core . TypeMapperFactory . createTypeMapper ( com . typemapper . namedresult . results . ClassWithEmbed . class ) ; int i = 0 ; while ( rs . next ( ) ) { final com . typemapper . namedresult . results . ClassWithEmbed result = ( ( com . typemapper . namedresult . results . ClassWithEmbed ) ( mapper . mapRow ( rs , ( i ++ ) ) ) ) ; "<AssertPlaceHolder>" ; } } getStr ( ) { return str ; }
|
org . junit . Assert . assertNull ( result . getStr ( ) )
|
test ( ) { org . openl . rules . context . IRulesRuntimeContext context = objectMapper . readValue ( json , org . openl . rules . context . IRulesRuntimeContext . class ) ; "<AssertPlaceHolder>" ; } getCurrentDate ( ) { return currentDate ; }
|
org . junit . Assert . assertEquals ( target , context . getCurrentDate ( ) )
|
should_get_property_value_defined_in_object_class ( ) { org . fest . reflect . core . Reflection_property_Test . Person person = new org . fest . reflect . core . Reflection_property_Test . Person ( ) ; java . lang . Class < ? > personClass = org . fest . reflect . core . Reflection . property ( "class" ) . ofType ( java . lang . Class . class ) . in ( person ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { try { java . lang . Object value = descriptor . getReadMethod ( ) . invoke ( target ) ; return castSafely ( value , propertyType ) ; } catch ( java . lang . Throwable t ) { java . lang . String msg = java . lang . String . format ( "Failed<sp>to<sp>get<sp>the<sp>value<sp>of<sp>property<sp>'%s'" , descriptor . getName ( ) ) ; throw new org . fest . reflect . exception . ReflectionError ( msg , t ) ; } }
|
org . junit . Assert . assertEquals ( org . fest . reflect . core . Reflection_property_Test . Person . class , personClass )
|
testAuthorizeReturningFalse ( ) { edu . illinois . library . cantaloupe . resource . RequestContext context = new edu . illinois . library . cantaloupe . resource . RequestContext ( ) ; context . setIdentifier ( new edu . illinois . library . cantaloupe . image . Identifier ( "forbidden-boolean.jpg" ) ) ; instance . setRequestContext ( context ) ; "<AssertPlaceHolder>" ; } authorize ( ) { final edu . illinois . library . cantaloupe . auth . Authorizer authorizer = new edu . illinois . library . cantaloupe . auth . AuthorizerFactory ( ) . newAuthorizer ( getDelegateProxy ( ) ) ; final edu . illinois . library . cantaloupe . auth . AuthInfo info = authorizer . authorize ( ) ; if ( info != null ) { final int code = info . getResponseStatus ( ) ; final java . lang . String location = info . getRedirectURI ( ) ; final edu . illinois . library . cantaloupe . image . ScaleConstraint scaleConstraint = info . getScaleConstraint ( ) ; if ( location != null ) { getResponse ( ) . setStatus ( code ) ; getResponse ( ) . setHeader ( "Cache-Control" , "no-cache" ) ; getResponse ( ) . setHeader ( "Location" , location ) ; new edu . illinois . library . cantaloupe . resource . StringRepresentation ( ( "Redirect:<sp>" + location ) ) . write ( getResponse ( ) . getOutputStream ( ) ) ; return false ; } else if ( scaleConstraint != null ) { edu . illinois . library . cantaloupe . http . Reference publicRef = getPublicReference ( scaleConstraint ) ; getResponse ( ) . setStatus ( code ) ; getResponse ( ) . setHeader ( "Cache-Control" , "no-cache" ) ; getResponse ( ) . setHeader ( "Location" , publicRef . toString ( ) ) ; new edu . illinois . library . cantaloupe . resource . StringRepresentation ( ( "Redirect:<sp>" + publicRef ) ) . write ( getResponse ( ) . getOutputStream ( ) ) ; return false ; } else if ( code >= 400 ) { getResponse ( ) . setStatus ( code ) ; getResponse ( ) . setHeader ( "Cache-Control" , "no-cache" ) ; if ( code == 401 ) { getResponse ( ) . setHeader ( "WWW-Authenticate" , info . getChallengeValue ( ) ) ; } throw new edu . illinois . library . cantaloupe . resource . ResourceException ( new edu . illinois . library . cantaloupe . http . Status ( code ) ) ; } } return true ; }
|
org . junit . Assert . assertFalse ( ( ( boolean ) ( instance . authorize ( ) ) ) )
|
refreshExistingSessionShouldFetchUserAndRoleManager ( ) { net . jforum . entities . User user = new net . jforum . entities . User ( ) ; user . setId ( 1 ) ; net . jforum . entities . UserSession us = this . newUserSession ( "123" ) ; us . setRequest ( request ) ; us . setResponse ( response ) ; us . setUser ( user ) ; when ( httpSession . getId ( ) ) . thenReturn ( "123" ) ; when ( userRepository . get ( user . getId ( ) ) ) . thenReturn ( user ) ; manager . add ( us ) ; manager . refreshSession ( us ) ; "<AssertPlaceHolder>" ; } getRoleManager ( ) { return this . roleManager ; }
|
org . junit . Assert . assertNotNull ( us . getRoleManager ( ) )
|
testApplyScriptNoReturn ( ) { java . lang . String script = "init<sp>=<sp>function()<sp>{};" + "apply<sp>=<sp>function(priceTick)<sp>{};" ; com . onplan . adviser . predicate . AdviserPredicate adviserPredicate = createAdviserPredicate ( script ) ; adviserPredicate . init ( ) ; int trueCount = 0 ; for ( com . onplan . domain . transitory . PriceTick priceTick : createPriceTicks ( ) ) { if ( adviserPredicate . apply ( priceTick ) ) { trueCount ++ ; } } "<AssertPlaceHolder>" ; } apply ( com . onplan . domain . transitory . PriceTick ) { if ( ( ( barOpenTimestamp ) <= 0 ) || ( ( priceTick . getTimestamp ( ) ) > ( barCloseTimestamp ) ) ) { prepareNewBar ( priceTick ) ; return false ; } final double pipsVariation = getPricePips ( ( ( priceTick . getClosePriceAsk ( ) ) - ( openPriceAsk ) ) , priceMinimalDecimalPosition ) ; if ( ( pipsVariation >= ( minimumPips ) ) && ( ! ( eventDispatched ) ) ) { eventDispatched = true ; return true ; } return false ; }
|
org . junit . Assert . assertEquals ( 0 , trueCount )
|
testSlotFromSlotKey ( ) { int expectedSlot = 1 ; int slot = com . rackspacecloud . blueflood . io . serializers . metrics . SlotKeySerDes . slotFromSlotKey ( com . rackspacecloud . blueflood . rollup . SlotKey . of ( Granularity . MIN_5 , expectedSlot , 10 ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( "ElasticMetricDiscovery<sp>[" + "tenantId=" ) + ( tenantId ) ) + ",<sp>" ) + "metricName=" ) + ( metricName ) ) + ",<sp>" ) + "fields=" ) + ( fields . toString ( ) ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( expectedSlot , slot )
|
testPRWithUpdateOnList ( ) { final java . lang . String str = ( ( ( ( ( ( ( ( ( ( ( "import<sp>" + ( java . util . List . class . getCanonicalName ( ) ) ) + "\n" ) + "rule<sp>R1<sp>when\n" ) + "<sp>$l<sp>:<sp>List(<sp>empty<sp>==<sp>true<sp>)\n" ) + "then\n" ) + "<sp>$l.add(\"test\"<sp>update($l);\n" 0 ) + "<sp>update($l);\n" ) + "<sp>update($l);\n" 1 ) + "rule<sp>R2<sp>when\n" ) + "<sp>$l<sp>:<sp>List(<sp>!this.contains(\"test\")<sp>)\n" ) + "then\n" ) + "<sp>update($l);\n" 1 ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( new java . util . ArrayList ( ) ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) )
|
testNumElitesBadState ( ) { state . population = getTestPopulation ( ) ; final ec . multiobjective . nsga2 . NSGA2Breeder instance = new ec . multiobjective . nsga2 . NSGA2Breeder ( ) ; instance . setup ( state , ec . multiobjective . nsga2 . NSGA2BreederTest . BASE ) ; final int result = instance . numElites ( state , 0 ) ; "<AssertPlaceHolder>" ; } numElites ( ec . multiobjective . nsga2 . EvolutionState , int ) { if ( ( breedingState ) != ( ec . multiobjective . nsga2 . NSGA2Breeder . BreedingState . ARCHIVE_LOADED ) ) state . output . fatal ( java . lang . String . format ( "%s:<sp>Tried<sp>to<sp>query<sp>numElites<sp>before<sp>loadElites()<sp>was<sp>called." , this . getClass ( ) . getSimpleName ( ) ) ) ; return numElites [ subpopulation ] ; }
|
org . junit . Assert . assertEquals ( 10 , result )
|
testDetermineOsFamilyForMac ( ) { final java . lang . String osName = "Mac<sp>OS<sp>X" ; "<AssertPlaceHolder>" ; } determineOsFamily ( java . lang . String ) { osName = ( osName == null ) ? "" : osName . toLowerCase ( Locale . ENGLISH ) ; if ( osName . contains ( "mac" ) ) { return com . vmware . xenon . common . SystemHostInfo . OsFamily . MACOS ; } else if ( osName . contains ( "win" ) ) { return com . vmware . xenon . common . SystemHostInfo . OsFamily . WINDOWS ; } else if ( osName . contains ( "nux" ) ) { return com . vmware . xenon . common . SystemHostInfo . OsFamily . LINUX ; } else { return com . vmware . xenon . common . SystemHostInfo . OsFamily . OTHER ; } }
|
org . junit . Assert . assertEquals ( OsFamily . MACOS , com . vmware . xenon . common . SystemHostInfo . determineOsFamily ( osName ) )
|
testAIOOBEHeight ( ) { java . awt . image . BufferedImage myImage = new java . awt . image . BufferedImage ( 100 , 354 , java . awt . image . BufferedImage . TYPE_INT_ARGB ) ; for ( int i = 19 ; i > 0 ; i -- ) { com . twelvemonkeys . image . ResampleOp resampler = new com . twelvemonkeys . image . ResampleOp ( 100 , i , ResampleOp . FILTER_LANCZOS ) ; java . awt . image . BufferedImage resizedImage = resampler . filter ( myImage , null ) ; "<AssertPlaceHolder>" ; } } filter ( java . awt . image . BufferedImage , java . awt . image . BufferedImage ) { int width = src . getWidth ( ) ; int height = src . getHeight ( ) ; int type = src . getType ( ) ; java . awt . image . WritableRaster srcRaster = src . getRaster ( ) ; if ( dst == null ) { dst = createCompatibleDestImage ( src , null ) ; } java . awt . image . WritableRaster dstRaster = dst . getRaster ( ) ; int [ ] inPixels = new int [ width ] ; for ( int y = 0 ; y < height ; y ++ ) { if ( type == ( java . awt . image . BufferedImage . TYPE_INT_ARGB ) ) { srcRaster . getDataElements ( 0 , y , width , 1 , inPixels ) ; for ( int x = 0 ; x < width ; x ++ ) { inPixels [ x ] = filterRGB ( x , y , inPixels [ x ] ) ; } dstRaster . setDataElements ( 0 , y , width , 1 , inPixels ) ; } else { src . getRGB ( 0 , y , width , 1 , inPixels , 0 , width ) ; for ( int x = 0 ; x < width ; x ++ ) { inPixels [ x ] = filterRGB ( x , y , inPixels [ x ] ) ; } dst . setRGB ( 0 , y , width , 1 , inPixels , 0 , width ) ; } } return dst ; }
|
org . junit . Assert . assertNotNull ( resizedImage )
|
testInt ( ) { com . questdb . net . ha . protocol . commands . IntResponseProducer producer = new com . questdb . net . ha . protocol . commands . IntResponseProducer ( ) ; com . questdb . net . ha . protocol . commands . IntResponseConsumer consumer = new com . questdb . net . ha . protocol . commands . IntResponseConsumer ( ) ; producer . write ( channel , 155 ) ; "<AssertPlaceHolder>" ; } getValue ( java . nio . channels . ReadableByteChannel ) { read ( channel ) ; return com . questdb . std . Unsafe . getUnsafe ( ) . getInt ( address ) ; }
|
org . junit . Assert . assertEquals ( 155 , consumer . getValue ( channel ) )
|
givenRegexWithoutCanonEq_whenMatchFailsOnEquivalentUnicode_thenCorrect ( ) { int matches = com . baeldung . java . regex . RegexUnitTest . runTest ( "é" , "é" ) ; "<AssertPlaceHolder>" ; } runTest ( java . lang . String , java . lang . String ) { com . baeldung . java . regex . RegexUnitTest . pattern = java . util . regex . Pattern . compile ( regex ) ; com . baeldung . java . regex . RegexUnitTest . matcher = com . baeldung . java . regex . RegexUnitTest . pattern . matcher ( text ) ; int matches = 0 ; while ( com . baeldung . java . regex . RegexUnitTest . matcher . find ( ) ) matches ++ ; return matches ; }
|
org . junit . Assert . assertFalse ( ( matches > 0 ) )
|
skipWorksWithBufferRefills ( ) { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . LittleDecoder fixture = new com . flagstone . transform . coder . LittleDecoder ( stream , 2 ) ; fixture . skip ( 3 ) ; "<AssertPlaceHolder>" ; } readByte ( ) { if ( ( ( size ) - ( index ) ) < 1 ) { fill ( ) ; } if ( ( ( index ) + 1 ) > ( size ) ) { throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; } return ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ; }
|
org . junit . Assert . assertEquals ( 4 , fixture . readByte ( ) )
|
shouldDeleteFoundFlowCookie ( ) { org . openkilda . model . FlowCookie cookie = org . openkilda . model . FlowCookie . builder ( ) . unmaskedCookie ( org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . TEST_COOKIE ) . flowId ( org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . TEST_FLOW_ID ) . build ( ) ; org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . createOrUpdate ( cookie ) ; java . util . Collection < org . openkilda . model . FlowCookie > allCookies = org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . findAll ( ) ; org . openkilda . model . FlowCookie foundCookie = allCookies . iterator ( ) . next ( ) ; org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . delete ( foundCookie ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return super . findAll ( ) . stream ( ) . map ( this :: completeWithPaths ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . repositories . impl . Neo4jFlowCookieRepositoryTest . flowCookieRepository . findAll ( ) . size ( ) )
|
autorisatieOngeldigDienstbundelDatumEindeInVerleden ( ) { dienst . getDienstbundel ( ) . setDatumEinde ( nl . bzk . algemeenbrp . util . common . DatumUtil . gisteren ( ) ) ; final boolean isGeldig = service . isAutorisatieGeldig ( toegangLeveringsAutorisatie , dienst ) ; "<AssertPlaceHolder>" ; } isAutorisatieGeldig ( nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie , nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst ) { if ( prevalideer ( toegang , dienst ) ) { return false ; } final nl . bzk . algemeenbrp . dal . domein . brp . entity . Leveringsautorisatie leveringsautorisatie = toegang . getLeveringsautorisatie ( ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . PartijRol geautoriseerde = toegang . getGeautoriseerde ( ) ; try { nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertDienstNietGeblokkeerd ( dienst ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertDienstbundelNietGeblokkeerd ( dienst . getDienstbundel ( ) ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertToegangLeveringsAutorisatieNietGeblokkeerd ( toegang ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertLeveringsautorisieNietGeblokkeerd ( leveringsautorisatie ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertDienstGeldig ( dienst ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertDienstbundelGeldig ( dienst . getDienstbundel ( ) ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertToegangLeveringsAutorisatieGeldig ( toegang ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertLeveringsautorisieGeldig ( leveringsautorisatie ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertPartijRolGeldig ( geautoriseerde ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertPartijUitPartijRolGeldig ( geautoriseerde ) ; nl . bzk . brp . service . algemeen . autorisatie . AutorisatieUtil . assertStelselCorrect ( leveringsautorisatie , geautoriseerde . getPartij ( ) , ( ( leveringsautorisatie . getStelsel ( ) ) == ( nl . bzk . algemeenbrp . dal . domein . brp . enums . Stelsel . BRP ) ) ) ; } catch ( nl . bzk . brp . service . algemeen . autorisatie . AutorisatieException e ) { nl . bzk . brp . service . selectie . lezer . job . SelectieAutorisatieServiceImpl . LOGGER . info ( ( "Autorisatiefout<sp>voor<sp>toegang<sp>leveringsautorisatie<sp>{}<sp>en<sp>dienst<sp>{}:<sp>" + e ) , toegang . getId ( ) , dienst . getId ( ) ) ; return false ; } return true ; }
|
org . junit . Assert . assertFalse ( isGeldig )
|
testLoginWithQuotes ( ) { org . talend . components . salesforce . SalesforceConnectionProperties props = setupProps ( null , org . talend . components . salesforce . integration . ADD_QUOTES ) ; org . talend . daikon . properties . presentation . Form f = props . getForm ( SalesforceConnectionProperties . FORM_WIZARD ) ; props = ( ( org . talend . components . salesforce . SalesforceConnectionProperties ) ( org . talend . daikon . properties . test . PropertiesTestUtils . checkAndValidate ( getComponentService ( ) , f , "testConnection" , props ) ) ) ; org . talend . components . salesforce . integration . SalesforceComponentTestIT . LOGGER . debug ( props . getValidationResult ( ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } getValidationResult ( ) { if ( ( ( prefix . getValue ( ) ) == null ) || ( prefix . getValue ( ) . isEmpty ( ) ) ) { return new org . talend . daikon . properties . ValidationResult ( org . talend . daikon . properties . ValidationResult . Result . ERROR , org . talend . components . azurestorage . blob . helpers . RemoteBlobsTable . messages . getMessage ( "error.VacantPrefix" ) ) ; } return org . talend . daikon . properties . ValidationResult . OK ; }
|
org . junit . Assert . assertEquals ( ValidationResult . Result . OK , props . getValidationResult ( ) . getStatus ( ) )
|
testReadPosCurrentBlock ( ) { java . lang . String fname = filenameOption ; positionReadOption = true ; int wrChunkSize = ( ( int ) ( org . apache . hadoop . hdfs . TestWriteRead . blockSize ) ) + ( ( int ) ( ( org . apache . hadoop . hdfs . TestWriteRead . blockSize ) / 2 ) ) ; long rdBeginPos = ( org . apache . hadoop . hdfs . TestWriteRead . blockSize ) + 1 ; int numTimes = 5 ; int stat = testWriteAndRead ( fname , numTimes , wrChunkSize , rdBeginPos ) ; "<AssertPlaceHolder>" ; } testWriteAndRead ( java . lang . String , int , int , long ) { int countOfFailures = 0 ; long byteVisibleToRead = 0 ; org . apache . hadoop . fs . FSDataOutputStream out = null ; byte [ ] outBuffer = new byte [ org . apache . hadoop . hdfs . TestWriteRead . BUFFER_SIZE ] ; byte [ ] inBuffer = new byte [ org . apache . hadoop . hdfs . TestWriteRead . BUFFER_SIZE ] ; for ( int i = 0 ; i < ( org . apache . hadoop . hdfs . TestWriteRead . BUFFER_SIZE ) ; i ++ ) { outBuffer [ i ] = ( ( byte ) ( i & 255 ) ) ; } try { org . apache . hadoop . fs . Path path = getFullyQualifiedPath ( fname ) ; long fileLengthBeforeOpen = 0 ; if ( ifExists ( path ) ) { if ( truncateOption ) { out = ( useFCOption ) ? mfc . create ( path , java . util . EnumSet . of ( CreateFlag . OVERWRITE ) ) : mfs . create ( path , truncateOption ) ; org . apache . hadoop . hdfs . TestWriteRead . LOG . info ( ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 7 + path ) ) ; } else { out = ( useFCOption ) ? mfc . create ( path , java . util . EnumSet . of ( CreateFlag . APPEND ) ) : mfs . append ( path ) ; fileLengthBeforeOpen = getFileLengthFromNN ( path ) ; org . apache . hadoop . hdfs . TestWriteRead . LOG . info ( ( ( ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 5 + fileLengthBeforeOpen ) + "<sp>File<sp>open<sp>for<sp>Append<sp>mode:<sp>" ) + path ) ) ; } } else { out = ( useFCOption ) ? mfc . create ( path , java . util . EnumSet . of ( CreateFlag . CREATE ) ) : mfs . create ( path ) ; } long totalByteWritten = fileLengthBeforeOpen ; long totalByteVisible = fileLengthBeforeOpen ; long totalByteWrittenButNotVisible = 0 ; boolean toFlush ; for ( int i = 0 ; i < loopN ; i ++ ) { toFlush = ( i % 2 ) == 0 ; writeData ( out , outBuffer , chunkSize ) ; totalByteWritten += chunkSize ; if ( toFlush ) { out . hflush ( ) ; totalByteVisible += chunkSize + totalByteWrittenButNotVisible ; totalByteWrittenButNotVisible = 0 ; } else { totalByteWrittenButNotVisible += chunkSize ; } if ( verboseOption ) { org . apache . hadoop . hdfs . TestWriteRead . LOG . info ( ( ( ( ( ( ( ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 2 + chunkSize ) + ".<sp>Total<sp>written<sp>=<sp>" ) + totalByteWritten ) + ".<sp>TotalByteVisible<sp>=<sp>" ) + totalByteVisible ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 0 ) + fname ) ) ; } byteVisibleToRead = readData ( fname , inBuffer , totalByteVisible , readBeginPosition ) ; java . lang . String readmsg = ( ( ( ( ( ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 3 + totalByteWritten ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 6 ) + totalByteVisible ) + "<sp>;<sp>Got<sp>Visible=" ) + byteVisibleToRead ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 9 ) + fname ; if ( ( byteVisibleToRead >= totalByteVisible ) && ( byteVisibleToRead <= totalByteWritten ) ) { readmsg = ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 8 + readmsg ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 4 ; } else { countOfFailures ++ ; readmsg = ( "fail:<sp>reader<sp>see<sp>different<sp>number<sp>of<sp>visible<sp>byte.<sp>" + readmsg ) + "<sp>[fail]" ; if ( abortTestOnFailure ) { throw new java . io . IOException ( readmsg ) ; } } org . apache . hadoop . hdfs . TestWriteRead . LOG . info ( readmsg ) ; } writeData ( out , outBuffer , chunkSize ) ; totalByteWritten += chunkSize ; totalByteVisible += chunkSize + totalByteWrittenButNotVisible ; totalByteWrittenButNotVisible += 0 ; out . close ( ) ; byteVisibleToRead = readData ( fname , inBuffer , totalByteVisible , readBeginPosition ) ; java . lang . String readmsg2 = ( ( ( ( ( ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 3 + totalByteWritten ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 6 ) + totalByteVisible ) + "<sp>;<sp>Got<sp>Visible=" ) + byteVisibleToRead ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 9 ) + fname ; java . lang . String readmsg ; if ( ( byteVisibleToRead >= totalByteVisible ) && ( byteVisibleToRead <= totalByteWritten ) ) { readmsg = ( "pass:<sp>reader<sp>sees<sp>expected<sp>number<sp>of<sp>visible<sp>byte<sp>on<sp>close.<sp>" + readmsg2 ) + "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 4 ; } else { countOfFailures ++ ; readmsg = ( "fail:<sp>reader<sp>sees<sp>different<sp>number<sp>of<sp>visible<sp>byte<sp>on<sp>close.<sp>" + readmsg2 ) + "<sp>[fail]" ; org . apache . hadoop . hdfs . TestWriteRead . LOG . info ( readmsg ) ; if ( abortTestOnFailure ) { throw new java . io . IOException ( readmsg ) ; } } long lenFromFc = getFileLengthFromNN ( path ) ; if ( lenFromFc != byteVisibleToRead ) { readmsg = ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" 1 + readmsg2 ) + "<sp>[fail]" ; throw new java . io . IOException ( readmsg ) ; } } catch ( java . io . IOException e ) { throw new java . io . IOException ( ( ( "#####<sp>Caught<sp>Exception<sp>in<sp>testAppendWriteAndRead.<sp>Close<sp>file.<sp>" + "Total<sp>Byte<sp>Read<sp>so<sp>far<sp>=<sp>" ) + byteVisibleToRead ) , e ) ; } finally { if ( out != null ) { out . close ( ) ; } } return - countOfFailures ; }
|
org . junit . Assert . assertEquals ( 0 , stat )
|
testArrayQueueReentrance ( ) { final java . util . List < java . lang . String > foo = new java . util . ArrayList ( ) ; for ( int i = randomIntBetween ( 2 , 1000 ) ; ( -- i ) > 0 ; ) { foo . add ( randomAsciiLettersOfLength ( 20 ) ) ; } final com . google . common . eventbus . EventBus aggregatedBus = new com . google . common . eventbus . EventBus ( "aggregated" ) ; final java . util . concurrent . atomic . AtomicBoolean hadErrors = new java . util . concurrent . atomic . AtomicBoolean ( ) ; final java . util . Deque < java . lang . String > stealingQueue = new java . util . ArrayDeque < java . lang . String > ( foo ) ; aggregatedBus . register ( new java . lang . Object ( ) { volatile com . carrotsearch . ant . tasks . junit4 . Thread foo ; @ com . google . common . eventbus . Subscribe public void onSlaveIdle ( com . carrotsearch . ant . tasks . junit4 . TestEventBusSanityCheck . SlaveIdle slave ) { final java . lang . Thread other = foo ; if ( other != null ) { hadErrors . set ( true ) ; throw new java . lang . RuntimeException ( ( ( ( "Wtf?<sp>two<sp>threads<sp>in<sp>a<sp>handler:<sp>" + other ) + "<sp>and<sp>" ) + ( java . lang . Thread . currentThread ( ) ) ) ) ; } foo = java . lang . Thread . currentThread ( ) ; if ( stealingQueue . isEmpty ( ) ) { slave . finished ( ) ; } else { java . lang . String suiteName = stealingQueue . pop ( ) ; slave . newSuite ( suiteName ) ; } foo = null ; } } ) ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final java . util . List < java . util . concurrent . Callable < java . lang . Void > > slaves = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( randomIntBetween ( 1 , 10 ) ) ; i ++ ) { slaves . add ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ com . carrotsearch . ant . tasks . junit4 . Override public com . carrotsearch . ant . tasks . junit4 . Void call ( ) throws com . carrotsearch . ant . tasks . junit4 . Exception { aggregatedBus . post ( new com . carrotsearch . ant . tasks . junit4 . TestEventBusSanityCheck . SlaveIdle ( ) ) ; return null ; } } ) ; } for ( java . util . concurrent . Future < java . lang . Void > f : executor . invokeAll ( slaves ) ) { f . get ( ) ; } executor . shutdown ( ) ; "<AssertPlaceHolder>" ; } call ( ) { aggregatedBus . post ( new com . carrotsearch . ant . tasks . junit4 . TestEventBusSanityCheck . SlaveIdle ( ) ) ; return null ; }
|
org . junit . Assert . assertFalse ( hadErrors . get ( ) )
|
testDebugPrintNullKeyToMap2 ( ) { final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; final java . io . PrintStream outPrint = new java . io . PrintStream ( out ) ; final java . lang . String INDENT = "<sp>" ; final java . util . Map < java . lang . Object , java . lang . Object > map = new java . util . HashMap ( ) ; final java . util . Map < java . lang . Object , java . lang . Object > map2 = new java . util . HashMap ( ) ; map . put ( null , map2 ) ; map2 . put ( "2" , "B" ) ; outPrint . println ( "{" ) ; outPrint . println ( ( INDENT + "null<sp>=<sp>" ) ) ; outPrint . println ( ( INDENT + "{" ) ) ; outPrint . println ( ( ( ( INDENT + INDENT ) + "2<sp>=<sp>B<sp>" ) + ( java . lang . String . class . getName ( ) ) ) ) ; outPrint . println ( ( ( INDENT + "}<sp>" ) + ( java . util . HashMap . class . getName ( ) ) ) ) ; outPrint . println ( ( "}<sp>" + ( java . util . HashMap . class . getName ( ) ) ) ) ; final java . lang . String EXPECTED_OUT = out . toString ( ) ; out . reset ( ) ; org . apache . commons . collections4 . MapUtils . debugPrint ( outPrint , null , map ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( last ) != null ) { return ( ( ( "MapIterator[" + ( getKey ( ) ) ) + "=" ) + ( getValue ( ) ) ) + "]" ; } return "MapIterator[]" ; }
|
org . junit . Assert . assertEquals ( EXPECTED_OUT , out . toString ( ) )
|
evaluate_returns_null_for_invalid_CEF_string ( ) { final java . util . Map < java . lang . String , org . graylog . plugins . pipelineprocessor . ast . expressions . Expression > arguments = com . google . common . collect . ImmutableMap . of ( CEFParserFunction . VALUE , new org . graylog . plugins . pipelineprocessor . ast . expressions . StringExpression ( new org . antlr . v4 . runtime . CommonToken ( 0 ) , "CEF:0|Foobar" ) , CEFParserFunction . USE_FULL_NAMES , new org . graylog . plugins . pipelineprocessor . ast . expressions . BooleanExpression ( new org . antlr . v4 . runtime . CommonToken ( 0 ) , false ) ) ; final org . graylog . plugins . pipelineprocessor . ast . functions . FunctionArgs functionArgs = new org . graylog . plugins . pipelineprocessor . ast . functions . FunctionArgs ( function , arguments ) ; final org . graylog2 . plugin . Message message = new org . graylog2 . plugin . Message ( "__dummy" , "__dummy" , org . joda . time . DateTime . parse ( "2010-07-30T16:03:25Z" ) ) ; final org . graylog . plugins . pipelineprocessor . EvaluationContext evaluationContext = new org . graylog . plugins . pipelineprocessor . EvaluationContext ( message ) ; final org . graylog . plugins . cef . pipelines . rules . CEFParserResult result = function . evaluate ( functionArgs , evaluationContext ) ; "<AssertPlaceHolder>" ; } evaluate ( org . graylog . plugins . pipelineprocessor . ast . functions . FunctionArgs , org . graylog . plugins . pipelineprocessor . EvaluationContext ) { return null ; }
|
org . junit . Assert . assertNull ( result )
|
writeJSONIgnoresMissingData ( ) { org . json . JSONObject json = new org . json . JSONObject ( ) ; this . tested . writeJSON ( this . patient , json , null ) ; "<AssertPlaceHolder>" ; } writeJSON ( org . phenotips . data . Patient , org . json . JSONObject , java . util . Collection ) { if ( ( selectedFieldNames == null ) || ( selectedFieldNames . contains ( org . phenotips . data . internal . controller . SpecificityController . NAME ) ) ) { org . phenotips . data . PatientData < java . lang . Object > specificity = patient . getData ( org . phenotips . data . internal . controller . SpecificityController . NAME ) ; if ( ( specificity != null ) && ( specificity . isNamed ( ) ) ) { org . json . JSONObject result = json . optJSONObject ( org . phenotips . data . internal . controller . SpecificityController . NAME ) ; if ( result == null ) { result = new org . json . JSONObject ( ) ; } java . util . Iterator < java . util . Map . Entry < java . lang . String , java . lang . Object > > data = specificity . dictionaryIterator ( ) ; while ( data . hasNext ( ) ) { java . util . Map . Entry < java . lang . String , java . lang . Object > datum = data . next ( ) ; result . put ( datum . getKey ( ) , datum . getValue ( ) ) ; } json . put ( org . phenotips . data . internal . controller . SpecificityController . NAME , result ) ; } } }
|
org . junit . Assert . assertEquals ( 0 , json . length ( ) )
|
testGetTypedArrayType32BitValue_FromBackingStore ( ) { com . eclipsesource . v8 . V8ArrayBuffer buffer = new com . eclipsesource . v8 . V8ArrayBuffer ( v8 , 4 ) ; v8 . add ( "buf" , buffer ) ; v8 . executeVoidScript ( "var<sp>ints<sp>=<sp>new<sp>Int32Array(buf);<sp>ints[0]<sp>=<sp>255;" ) ; "<AssertPlaceHolder>" ; buffer . close ( ) ; } getInt ( int ) { v8 . checkThread ( ) ; checkReleased ( ) ; return byteBuffer . getInt ( index ) ; }
|
org . junit . Assert . assertEquals ( 255 , buffer . getInt ( 0 ) )
|
filterIsValidFieldFalse ( ) { org . spincast . core . request . Form form = getFormFactory ( ) . createForm ( "myFormName" , null ) ; org . spincast . core . json . JsonObject model = getJsonManager ( ) . create ( ) ; org . spincast . core . json . JsonObject validationElement = getJsonManager ( ) . create ( ) ; model . set ( getSpincastConfig ( ) . getValidationElementDefaultName ( ) , validationElement ) ; form . setValidationObject ( validationElement ) ; form . addSuccess ( "age" , "age1" , "message" ) ; form . addError ( "age" , "age2" , "message" ) ; java . lang . String html = getTemplatingEngine ( ) . evaluate ( "<sp>{%<sp>if<sp>validation['myFormName.age']<sp>|<sp>validationIsValid()<sp>%}yes{%<sp>endif<sp>%}" , model ) . trim ( ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . String , java . util . Map ) { return evaluate ( content , params , getLocaleToUse ( ) ) ; }
|
org . junit . Assert . assertEquals ( "" , html )
|
testForcedBrowserModeIsNullByDefault ( ) { "<AssertPlaceHolder>" ; } getForcedBrowserMode ( ) { return forcedBrowserMode ; }
|
org . junit . Assert . assertNull ( configuration . getForcedBrowserMode ( ) )
|
testSave ( ) { java . util . List < software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass > objs = new java . util . ArrayList < software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass > ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass obj = getUniqueObject ( ) ; objs . add ( obj ) ; } software . amazon . awssdk . services . dynamodb . datamodeling . DynamoDbMapper util = new software . amazon . awssdk . services . dynamodb . datamodeling . DynamoDbMapper ( dynamo ) ; for ( software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass obj : objs ) { util . save ( obj ) ; } for ( software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass obj : objs ) { software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass loaded = util . load ( software . amazon . awssdk . services . dynamodb . mapper . NumberSetAttributeClass . class , obj . getKey ( ) ) ; "<AssertPlaceHolder>" ; } } getKey ( ) { return this . key ; }
|
org . junit . Assert . assertEquals ( obj , loaded )
|
testGetUrlLauncherService ( ) { org . eclipse . rap . rwt . client . service . ClientService service = client . getService ( org . eclipse . rap . rwt . client . service . UrlLauncher . class ) ; "<AssertPlaceHolder>" ; } getService ( java . lang . Class ) { T result = null ; if ( type == ( org . eclipse . rap . rwt . client . service . JavaScriptExecutor . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . JavaScriptExecutorImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . JavaScriptLoader . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . JavaScriptLoaderImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . UrlLauncher . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . UrlLauncherImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . internal . resources . JavaScriptModuleLoader . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . resources . JavaScriptModuleLoaderImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . BrowserNavigation . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . BrowserNavigationImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . ExitConfirmation . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . ExitConfirmationImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . internal . client . ConnectionMessages . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . ConnectionMessagesImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . ClientInfo . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . ClientInfoImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . internal . client . ClientMessages . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . WebClientMessages . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . ClientFileLoader . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . ClientFileLoaderImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . ClientFileUploader . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . ClientFileUploaderImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . StartupParameters . class ) ) { result = ( ( T ) ( org . eclipse . rap . rwt . client . WebClient . getServiceImpl ( org . eclipse . rap . rwt . internal . client . StartupParametersImpl . class ) ) ) ; } return result ; }
|
org . junit . Assert . assertTrue ( ( service instanceof org . eclipse . rap . rwt . internal . client . UrlLauncherImpl ) )
|
setComponentPropertyTest ( ) { java . io . File configFile = new java . io . File ( "src/test/edu/cmu/sphinx/util/props/test/ConfigurationManagerTest.testconfig.sxl" ) ; edu . cmu . sphinx . util . props . ConfigurationManager cm = new edu . cmu . sphinx . util . props . ConfigurationManager ( configFile . toURI ( ) . toURL ( ) ) ; int newBeamWidth = 4711 ; edu . cmu . sphinx . util . props . ConfigurationManagerUtils . setProperty ( cm , "beamWidth" , java . lang . String . valueOf ( newBeamWidth ) ) ; edu . cmu . sphinx . util . props . test . DummyComp dummyComp = ( ( edu . cmu . sphinx . util . props . test . DummyComp ) ( cm . lookup ( "duco" ) ) ) ; "<AssertPlaceHolder>" ; } getBeamWidth ( ) { return beamWidth ; }
|
org . junit . Assert . assertEquals ( newBeamWidth , dummyComp . getBeamWidth ( ) )
|
testMenuItemAbstain ( ) { permissionManager . setAuthorizationPolicy ( null ) ; boolean result = authorizationManager . authorize ( menuPerspective1 , user ) ; "<AssertPlaceHolder>" ; } authorize ( org . uberfire . security . authz . Permission , org . jboss . errai . security . shared . api . identity . User ) { return authorize ( permission , user , null ) ; }
|
org . junit . Assert . assertEquals ( result , true )
|
testGetAllEpisodes ( ) { com . omertron . thetvdbapi . LOG . info ( "testGetAllEpisodes" ) ; java . util . List < com . omertron . thetvdbapi . model . Episode > episodes = tvdb . getAllEpisodes ( com . omertron . thetvdbapi . TheTvDbApiTest . TVDBID , com . omertron . thetvdbapi . TheTvDbApiTest . LANGUAGE_ENGLISH ) ; "<AssertPlaceHolder>" ; } getAllEpisodes ( java . lang . String , java . lang . String ) { java . util . List < com . omertron . thetvdbapi . model . Episode > episodeList = java . util . Collections . emptyList ( ) ; if ( isValidNumber ( id ) ) { java . lang . StringBuilder urlBuilder = new java . lang . StringBuilder ( ) ; urlBuilder . append ( com . omertron . thetvdbapi . TheTVDBApi . BASE_URL ) . append ( apiKey ) . append ( com . omertron . thetvdbapi . TheTVDBApi . SERIES_URL ) . append ( id ) . append ( com . omertron . thetvdbapi . TheTVDBApi . ALL_URL ) ; if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( language ) ) { urlBuilder . append ( language ) . append ( com . omertron . thetvdbapi . TheTVDBApi . XML_EXTENSION ) ; } com . omertron . thetvdbapi . TheTVDBApi . LOG . trace ( com . omertron . thetvdbapi . TheTVDBApi . URL , urlBuilder . toString ( ) ) ; episodeList = com . omertron . thetvdbapi . tools . TvdbParser . getAllEpisodes ( urlBuilder . toString ( ) , ( - 1 ) ) ; } return episodeList ; }
|
org . junit . Assert . assertFalse ( episodes . isEmpty ( ) )
|
buildScoreDirector ( ) { org . optaplanner . core . impl . domain . solution . descriptor . SolutionDescriptor < org . optaplanner . core . impl . testdata . domain . TestdataSolution > solutionDescriptor = org . optaplanner . core . impl . testdata . domain . TestdataSolution . buildSolutionDescriptor ( ) ; org . optaplanner . core . impl . score . director . easy . EasyScoreCalculator < org . optaplanner . core . impl . testdata . domain . TestdataSolution > scoreCalculator = mock ( org . optaplanner . core . impl . score . director . easy . EasyScoreCalculator . class ) ; when ( scoreCalculator . calculateScore ( any ( org . optaplanner . core . impl . testdata . domain . TestdataSolution . class ) ) ) . thenAnswer ( ( invocation ) -> org . optaplanner . core . api . score . buildin . simple . SimpleScore . of ( ( - 10 ) ) ) ; org . optaplanner . core . impl . score . director . easy . EasyScoreDirectorFactory < org . optaplanner . core . impl . testdata . domain . TestdataSolution > directorFactory = new org . optaplanner . core . impl . score . director . easy . EasyScoreDirectorFactory ( solutionDescriptor , scoreCalculator ) ; org . optaplanner . core . impl . score . director . easy . EasyScoreDirector < org . optaplanner . core . impl . testdata . domain . TestdataSolution > director = directorFactory . buildScoreDirector ( false , false ) ; org . optaplanner . core . impl . testdata . domain . TestdataSolution solution = new org . optaplanner . core . impl . testdata . domain . TestdataSolution ( ) ; solution . setValueList ( java . util . Collections . emptyList ( ) ) ; solution . setEntityList ( java . util . Collections . emptyList ( ) ) ; director . setWorkingSolution ( solution ) ; "<AssertPlaceHolder>" ; } ofUninitialized ( int , int ) { return new org . optaplanner . core . api . score . buildin . simple . SimpleScore ( initScore , score ) ; }
|
org . junit . Assert . assertEquals ( org . optaplanner . core . api . score . buildin . simple . SimpleScore . ofUninitialized ( 0 , ( - 10 ) ) , director . calculateScore ( ) )
|
testMatches_false ( ) { com . fasterxml . jackson . databind . node . ValueNode valueNode = jsonNodeFactory . numberNode ( java . lang . Integer . valueOf ( 20 ) ) ; nl . fd . hamcrest . jackson . IsJsonInt matcher = new nl . fd . hamcrest . jackson . IsJsonInt ( 10 ) ; boolean matches = matcher . matches ( valueNode ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertFalse ( matches )
|
testAdvanceAssignmentTest ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
getDrugByUuid_shouldFindObjectGivenValidUuid ( ) { java . lang . String uuid = "3cfcf118-931c-46f7-8ff6-7b876f0d4202" ; org . openmrs . Drug drug = org . openmrs . api . context . Context . getConceptService ( ) . getDrugByUuid ( uuid ) ; "<AssertPlaceHolder>" ; } getDrugId ( ) { return this . drugId ; }
|
org . junit . Assert . assertEquals ( 2 , ( ( int ) ( drug . getDrugId ( ) ) ) )
|
testInitOutBufferIgnoreHashcode ( ) { org . hawkular . apm . client . collector . internal . FragmentBuilder builder = new org . hawkular . apm . client . collector . internal . FragmentBuilder ( ) ; builder . initOutBuffer ( 1 ) ; "<AssertPlaceHolder>" ; } isOutBufferActive ( java . lang . Object ) { return collector ( ) . isOutBufferActive ( getRuleName ( ) , obj ) ; }
|
org . junit . Assert . assertTrue ( builder . isOutBufferActive ( ( - 1 ) ) )
|
serialization ( ) { net . sf . hajdbc . state . DatabaseEvent event1 = new net . sf . hajdbc . state . DatabaseEvent ( new net . sf . hajdbc . MockDatabase ( "1" ) ) ; net . sf . hajdbc . state . DatabaseEvent event2 = net . sf . hajdbc . util . Objects . deserialize ( net . sf . hajdbc . util . Objects . serialize ( event1 ) , net . sf . hajdbc . state . DatabaseEvent . class ) ; "<AssertPlaceHolder>" ; } serialize ( java . lang . Object ) { if ( object == null ) return null ; java . io . ByteArrayOutputStream bytes = new java . io . ByteArrayOutputStream ( ) ; try ( java . io . ObjectOutput output = new java . io . ObjectOutputStream ( bytes ) ) { output . writeObject ( object ) ; output . flush ( ) ; return bytes . toByteArray ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . IllegalStateException ( e ) ; } }
|
org . junit . Assert . assertEquals ( event1 , event2 )
|
testCompareTo ( ) { java . util . List < io . scigraph . annotation . EntityAnnotation > list = com . google . common . collect . Lists . newArrayList ( annot1 , annot2 , annot3 , annot4 , annot5 ) ; java . util . Collections . sort ( list ) ; java . util . List < io . scigraph . annotation . EntityAnnotation > expected = newArrayList ( annot5 , annot2 , annot1 , annot3 , annot4 ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertThat ( list , org . hamcrest . CoreMatchers . is ( expected ) )
|
equalsEquivelentTest ( ) { java . lang . StackTraceElement [ ] stack = java . lang . Thread . currentThread ( ) . getStackTrace ( ) ; org . threadly . util . debug . Profiler . Trace t1 = new org . threadly . util . debug . Profiler . Trace ( stack ) ; org . threadly . util . debug . Profiler . Trace t2 = new org . threadly . util . debug . Profiler . Trace ( stack ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } else { try { org . threadly . util . debug . ComparableTrace t = ( ( org . threadly . util . debug . ComparableTrace ) ( o ) ) ; if ( ( t . hash ) != ( hash ) ) { return false ; } else { return java . util . Arrays . equals ( t . elements , elements ) ; } } catch ( java . lang . ClassCastException e ) { return false ; } } }
|
org . junit . Assert . assertTrue ( t1 . equals ( t2 ) )
|
testDatabaseTypeListener ( ) { org . pentaho . ui . database . event . DataHandler . DatabaseTypeListener listener = spy ( new org . pentaho . ui . database . event . DataHandler . DatabaseTypeListener ( org . pentaho . di . core . plugins . PluginRegistry . getInstance ( ) ) { @ org . pentaho . ui . database . event . Override public void databaseTypeAdded ( java . lang . String pluginName , org . pentaho . di . core . database . DatabaseInterface databaseInterface ) { } @ org . pentaho . ui . database . event . Override public void databaseTypeRemoved ( java . lang . String pluginName ) { } } ) ; "<AssertPlaceHolder>" ; org . pentaho . di . core . plugins . PluginInterface pluginInterface = mock ( org . pentaho . di . core . plugins . PluginInterface . class ) ; when ( pluginInterface . getName ( ) ) . thenReturn ( "Oracle" ) ; doReturn ( org . pentaho . di . core . database . DatabaseInterface . class ) . when ( pluginInterface ) . getMainType ( ) ; when ( pluginInterface . getIds ( ) ) . thenReturn ( new java . lang . String [ ] { "oracle" } ) ; doReturn ( org . pentaho . di . core . plugins . DatabasePluginType . class ) . when ( pluginInterface ) . getPluginType ( ) ; listener . pluginAdded ( pluginInterface ) ; verify ( listener , never ( ) ) . databaseTypeAdded ( eq ( "Oracle" ) , any ( org . pentaho . di . core . database . DatabaseInterface . class ) ) ; listener . pluginRemoved ( pluginInterface ) ; verify ( listener , times ( 1 ) ) . databaseTypeRemoved ( "Oracle" ) ; listener . pluginChanged ( pluginInterface ) ; verify ( listener , times ( 2 ) ) . databaseTypeRemoved ( "Oracle" ) ; verify ( listener , never ( ) ) . databaseTypeAdded ( eq ( "Oracle" ) , any ( org . pentaho . di . core . database . DatabaseInterface . class ) ) ; } databaseTypeRemoved ( java . lang . String ) { }
|
org . junit . Assert . assertNotNull ( listener )
|
testCacheRemove ( ) { T cache = getCache ( ) ; java . lang . String key = org . cache2k . extra . spring . AbstractCacheTests . createRandomKey ( ) ; java . lang . Object value = "george" ; "<AssertPlaceHolder>" ; cache . put ( key , value ) ; } get ( K ) { return super . get ( key ) ; }
|
org . junit . Assert . assertNull ( cache . get ( key ) )
|
testSecureSource ( ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "192.168.1.22" , 2727 ) ; final io . netty . channel . Channel channel = org . mockito . Mockito . mock ( io . netty . channel . Channel . class ) ; final org . restcomm . media . core . network . netty . filter . NetworkGuard guard = new org . restcomm . media . core . network . netty . filter . DirectNetworkGuard ( ) ; org . mockito . Mockito . when ( channel . isActive ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( channel . remoteAddress ( ) ) . thenReturn ( remoteAddress ) ; final boolean secure = guard . isSecure ( channel , remoteAddress ) ; "<AssertPlaceHolder>" ; } isSecure ( org . restcomm . media . core . network . deprecated . channel . NetworkChannel , java . net . InetSocketAddress ) { if ( channel . isConnected ( ) ) { return channel . getRemoteAddress ( ) . equals ( source ) ; } return false ; }
|
org . junit . Assert . assertTrue ( secure )
|
canProcessStreamMultipleTimes ( ) { java . math . BigDecimal bd = new java . math . BigDecimal ( "01234567890123456789012345678901234567890123456789012345678901234567890" ) ; java . lang . String largeString = ( "\"" + bd ) + "\"" ; byte [ ] bytes = largeString . getBytes ( ) ; java . io . ByteArrayInputStream is = new java . io . ByteArrayInputStream ( bytes ) ; com . dslplatform . json . DslJson < java . lang . Object > json = new com . dslplatform . json . DslJson < java . lang . Object > ( ) ; com . dslplatform . json . JsonReader < java . lang . Object > input = json . newReader ( is , new byte [ 1024 ] ) ; com . dslplatform . json . JsonReader . ReadObject < java . math . BigDecimal > converter = json . tryFindReader ( java . math . BigDecimal . class ) ; for ( int i = 0 ; i < 10 ; i ++ ) { java . math . BigDecimal value = json . deserialize ( converter , input ) ; "<AssertPlaceHolder>" ; is . reset ( ) ; input . process ( is ) ; } } deserialize ( com . dslplatform . json . TypeDefinition , java . io . InputStream ) { return ( ( T ) ( json . deserialize ( td . type , is ) ) ) ; }
|
org . junit . Assert . assertEquals ( bd , value )
|
testComplexUnionSchema ( ) { org . apache . avro . Schema avroSchema = new org . apache . avro . Schema . Parser ( ) . parse ( new java . io . File ( "src/test/avro/AvroMessage.avsc" ) ) ; org . apache . kafka . connect . data . Schema connectSchema = avroData . toConnectSchema ( avroSchema ) ; org . apache . avro . Schema outputAvroSchema = avroData . fromConnectSchema ( connectSchema ) ; "<AssertPlaceHolder>" ; } fromConnectSchema ( org . apache . kafka . connect . data . Schema ) { return fromConnectSchema ( schema , new java . util . HashMap < org . apache . kafka . connect . data . Schema , org . apache . avro . Schema > ( ) ) ; }
|
org . junit . Assert . assertEquals ( avroSchema , outputAvroSchema )
|
testBanServiceOnFacility ( ) { System . out . println ( "ServiceDenialDaoTest.blockServiceOnFacility" ) ; serviceDenialDao . blockServiceOnFacility ( testService1 . getId ( ) , testFacilityId1 ) ; "<AssertPlaceHolder>" ; } isServiceBlockedOnFacility ( int , int ) { int denials = this . queryForInt ( "select<sp>count(*)<sp>from<sp>service_denials<sp>where<sp>service_id<sp>=<sp>?<sp>and<sp>facility_id<sp>=<sp>?" , serviceId , facilityId ) ; if ( denials > 0 ) { return true ; } return false ; }
|
org . junit . Assert . assertTrue ( serviceDenialDao . isServiceBlockedOnFacility ( testService1 . getId ( ) , testFacilityId1 ) )
|
itShouldGiveSubgroupName ( ) { java . lang . String expectedSubgroupName = "TestSubGroup" ; hydrograph . ui . propertywindow . property . Property property = new hydrograph . ui . propertywindow . property . Property . Builder ( "String" , "delimiter" , "TEXT" ) . group ( "TextProperties" ) . subGroup ( "TestSubGroup" ) . build ( ) ; "<AssertPlaceHolder>" ; } getPropertySubGroup ( ) { return subGroup ; }
|
org . junit . Assert . assertEquals ( expectedSubgroupName , property . getPropertySubGroup ( ) )
|
testInvalidParse ( ) { final java . lang . String urn = "urn:ogcx:def:CRS:EPSG:6.8:4326" ; try { new org . geotools . referencing . factory . URN_Parser ( urn ) ; org . junit . Assert . fail ( ) ; } catch ( org . opengis . referencing . NoSuchAuthorityCodeException e ) { "<AssertPlaceHolder>" ; } } getAuthorityCode ( ) { return code ; }
|
org . junit . Assert . assertEquals ( urn , e . getAuthorityCode ( ) )
|
xmlWithNoAddJUnitPublisherIsLoadedCorrectly ( ) { hudson . model . FreeStyleProject p = ( ( hudson . model . FreeStyleProject ) ( jenkinsRule . jenkins . getItem ( "old" ) ) ) ; org . jenkinsci . plugins . parallel_test_executor . ParallelTestExecutor trigger = ( ( org . jenkinsci . plugins . parallel_test_executor . ParallelTestExecutor ) ( p . getBuilders ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } isArchiveTestResults ( ) { return ! ( doNotArchiveTestResults ) ; }
|
org . junit . Assert . assertTrue ( trigger . isArchiveTestResults ( ) )
|
testNullToEmptyDoubleObject ( ) { final java . lang . Double [ ] original = new java . lang . Double [ ] { 1.0 , 2.0 } ; "<AssertPlaceHolder>" ; } nullToEmpty ( java . lang . Object [ ] ) { if ( org . apache . commons . lang3 . ArrayUtils . isEmpty ( array ) ) { return org . apache . commons . lang3 . ArrayUtils . EMPTY_OBJECT_ARRAY ; } return array ; }
|
org . junit . Assert . assertArrayEquals ( original , org . apache . commons . lang3 . ArrayUtils . nullToEmpty ( original ) )
|
testCustomRangeHasFrequency ( ) { java . lang . String from = "2018-01-01" ; java . lang . String to = "2018-01-31" ; com . liferay . portal . kernel . search . facet . collector . TermCollector termCollector = mockTermCollector ( _dateRangeFactory . getRangeString ( from , to ) ) ; int frequency = com . liferay . portal . kernel . test . util . RandomTestUtil . randomInt ( ) ; mockTermCollectorFrequency ( termCollector , frequency ) ; com . liferay . portal . search . web . internal . modified . facet . display . context . ModifiedFacetDisplayBuilder modifiedFacetDisplayBuilder = createDisplayBuilder ( ) ; modifiedFacetDisplayBuilder . setFromParameterValue ( from ) ; modifiedFacetDisplayBuilder . setToParameterValue ( to ) ; com . liferay . portal . search . web . internal . modified . facet . display . context . ModifiedFacetDisplayContext modifiedFacetDisplayContext = modifiedFacetDisplayBuilder . build ( ) ; com . liferay . portal . search . web . internal . modified . facet . display . context . ModifiedFacetTermDisplayContext modifiedFacetTermDisplayContext = modifiedFacetDisplayContext . getCustomRangeModifiedFacetTermDisplayContext ( ) ; "<AssertPlaceHolder>" ; } getFrequency ( ) { if ( ( _frequency ) == null ) { return "" ; } else { return _frequency ; } }
|
org . junit . Assert . assertEquals ( frequency , modifiedFacetTermDisplayContext . getFrequency ( ) )
|
testBuscaFuncionarioNaoExiste ( ) { br . com . senacrs . alp . aulas . trabalho8 . Funcionario busca = null ; busca = this . empresa . buscaFuncionario ( "nome" ) ; "<AssertPlaceHolder>" ; } buscaFuncionario ( java . lang . String ) { return null ; }
|
org . junit . Assert . assertNull ( busca )
|
testSerialization ( ) { com . openshift . android . model . UserResource user = new com . openshift . android . model . UserResource ( ) ; user . setLogin ( "openshiftandroid@gmail.com" ) ; java . lang . String json = gson . toJson ( user ) ; "<AssertPlaceHolder>" ; System . out . println ( json ) ; } setLogin ( java . lang . String ) { this . login = login ; }
|
org . junit . Assert . assertNotNull ( json )
|
testRepeatedAdds ( ) { System . out . println ( "testRepeatedAdds" ) ; uk . ac . susx . mlcl . lib . Calendar cal = uk . ac . susx . mlcl . lib . Calendar . getInstance ( ) ; uk . ac . susx . mlcl . lib . MemoryUsage mp = new uk . ac . susx . mlcl . lib . MemoryUsage ( ) ; mp . add ( cal ) ; System . out . println ( "\n" ) ; final long expectedSize = mp . getSizeBits ( ) ; mp . add ( cal ) ; "<AssertPlaceHolder>" ; System . out . println ( mp ) ; } add ( java . lang . Object ) { uk . ac . susx . mlcl . lib . Checks . checkNotNull ( "obj" , obj ) ; queue . addLast ( obj ) ; while ( ! ( queue . isEmpty ( ) ) ) { final java . lang . Object o = queue . removeFirst ( ) ; if ( ! ( objectsSeen . contains ( o ) ) ) visitObject ( o ) ; } return this ; }
|
org . junit . Assert . assertEquals ( expectedSize , mp . getSizeBits ( ) )
|
playAround ( ) { java . lang . String url = "http://localhost:8080/oscar_alberta/lab/newLabUpload.do" ; java . lang . String publicOscarKeyString = org . oscarehr . labs . alberta . CLSHandlerIntegrationTest . OSCAR_KEY ; java . lang . String publicServiceKeyString = org . oscarehr . labs . alberta . CLSHandlerIntegrationTest . CLIENT_KEY ; java . security . PublicKey publicOscarKey = org . oscarehr . common . hl7 . v2 . oscar_to_oscar . SendingUtils . getPublicOscarKey ( publicOscarKeyString ) ; java . security . PrivateKey publicServiceKey = org . oscarehr . common . hl7 . v2 . oscar_to_oscar . SendingUtils . getPublicServiceKey ( publicServiceKeyString ) ; java . io . InputStream is = this . getClass ( ) . getResourceAsStream ( "/labs/HL7-CLS/MillenniumUpgrade2010_Clinic_Validation_Current.hl7" ) ; byte [ ] bytes = org . apache . commons . io . IOUtils . toByteArray ( is ) ; org . oscarehr . common . model . Provider provider = new org . oscarehr . common . model . Provider ( ) ; provider . setProviderNo ( "1" ) ; org . oscarehr . util . LoggedInInfo l = new org . oscarehr . util . LoggedInInfo ( ) ; l . setLoggedInProvider ( provider ) ; int statusCode = org . oscarehr . common . hl7 . v2 . oscar_to_oscar . SendingUtils . send ( l , bytes , url , publicOscarKey , publicServiceKey , "CLS" ) ; org . oscarehr . labs . alberta . CLSHandlerIntegrationTest . logger . info ( ( "Completed<sp>Labs<sp>upload<sp>call<sp>with<sp>status<sp>" + statusCode ) ) ; "<AssertPlaceHolder>" ; } send ( org . oscarehr . util . LoggedInInfo , ca . uhn . hl7v2 . model . AbstractMessage , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { java . security . PrivateKey publicServiceKey = org . oscarehr . common . hl7 . v2 . oscar_to_oscar . SendingUtils . getPublicServiceKey ( publicServiceKeyString ) ; java . security . PublicKey publicOscarKey = org . oscarehr . common . hl7 . v2 . oscar_to_oscar . SendingUtils . getPublicOscarKey ( publicOscarKeyString ) ; byte [ ] dataBytes = OscarToOscarUtils . pipeParser . encode ( message ) . getBytes ( ) ; return org . oscarehr . common . hl7 . v2 . oscar_to_oscar . SendingUtils . send ( loggedInInfo , dataBytes , url , publicOscarKey , publicServiceKey , serviceName ) ; }
|
org . junit . Assert . assertEquals ( 200 , statusCode )
|
testConvertDateToString_DateTime_String ( ) { com . moviejukebox . tools . DateTimeToolsTest . LOG . info ( "convertDateToString" ) ; org . pojava . datetime . DateTime convertDate = new org . pojava . datetime . DateTime ( 0 ) ; java . lang . String dateFormat = "dd/MM/yyyy" ; java . lang . String expResult = "01/01/1970" ; java . lang . String result = com . moviejukebox . tools . DateTimeTools . convertDateToString ( convertDate , dateFormat ) ; "<AssertPlaceHolder>" ; } convertDateToString ( java . util . Date , java . lang . String ) { return com . moviejukebox . tools . DateTimeTools . convertDateToString ( new com . moviejukebox . tools . DateTime ( convertDate . getTime ( ) ) , dateFormat ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testLongReasonForConfigChangeType ( ) { long ctime = java . lang . System . currentTimeMillis ( ) ; org . hyperic . hq . events . server . session . Alert testPlatformAlert = alertManager . createAlert ( this . testPlatformAlertDef , ctime ) ; org . hyperic . hq . events . server . session . AlertCondition cond = new org . hyperic . hq . events . server . session . AlertCondition ( ) ; cond . setName ( "Config<sp>Change" ) ; cond . setType ( EventConstants . TYPE_CFG_CHG ) ; cond . setOptionStatus ( "platform.properties" ) ; int appDefType = testPlatform . getResource ( ) . getResourceType ( ) . getAppdefType ( ) ; org . hyperic . hq . measurement . server . session . MonitorableType monitor_Type = new org . hyperic . hq . measurement . server . session . MonitorableType ( "Incorrect<sp>Long<sp>Reason" 2 , appDefType , "test" ) ; org . hyperic . hq . measurement . server . session . Category cate = new org . hyperic . hq . measurement . server . session . Category ( "Test<sp>Category" ) ; sessionFactory . getCurrentSession ( ) . save ( monitor_Type ) ; sessionFactory . getCurrentSession ( ) . save ( cate ) ; org . hyperic . hq . measurement . server . session . MeasurementTemplate testTempl = new org . hyperic . hq . measurement . server . session . MeasurementTemplate ( "LogTemplate" , "avail" , "percentage" , 1 , true , 60000L , true , "Availability:avail" , monitor_Type , cate , "test" ) ; sessionFactory . getCurrentSession ( ) . save ( testTempl ) ; java . util . List < org . hyperic . hq . measurement . server . session . Measurement > meas = measurementManager . createOrUpdateMeasurements ( this . testPlatform . getEntityId ( ) , new java . lang . Integer [ ] { testTempl . getId ( ) } , new long [ ] { 60000L } , new org . hyperic . util . config . ConfigResponse ( ) , new org . hyperic . hq . util . Reference < java . lang . Boolean > ( ) ) ; cond . setMeasurementId ( meas . get ( 0 ) . getId ( ) ) ; testPlatformAlert . createConditionLog ( "Incorrect<sp>Long<sp>Reason" 0 , cond ) ; java . lang . String longReason = alertManager . getLongReason ( testPlatformAlert ) ; "<AssertPlaceHolder>" ; } getLongReason ( org . hyperic . hq . events . server . session . Alert ) { final java . lang . String indent = "<sp>" ; java . util . Collection < org . hyperic . hq . events . server . session . AlertConditionLog > clogs = alert . getConditionLog ( ) ; org . hyperic . hq . events . server . session . AlertConditionLog [ ] logs = ( ( org . hyperic . hq . events . server . session . AlertConditionLog [ ] ) ( clogs . toArray ( new org . hyperic . hq . events . server . session . AlertConditionLog [ clogs . size ( ) ] ) ) ) ; java . lang . StringBuffer text = new java . lang . StringBuffer ( ) ; for ( int i = 0 ; i < ( logs . length ) ; i ++ ) { org . hyperic . hq . events . server . session . AlertCondition cond = logs [ i ] . getCondition ( ) ; if ( i == 0 ) { text . append ( "\n" ) . append ( indent ) . append ( "If<sp>" ) ; } else { text . append ( "\n" ) . append ( indent ) . append ( ( cond . isRequired ( ) ? "AND<sp>" : "OR<sp>" ) ) ; } org . hyperic . hq . measurement . server . session . Measurement dm = null ; switch ( cond . getType ( ) ) { case org . hyperic . hq . events . EventConstants . TYPE_THRESHOLD : case org . hyperic . hq . events . EventConstants . TYPE_BASELINE : dm = measurementDAO . findById ( new java . lang . Integer ( cond . getMeasurementId ( ) ) ) ; text . append ( cond . describe ( dm ) ) ; java . lang . String actualValue = logs [ i ] . getValue ( ) ; text . append ( "<sp>(actual<sp>value<sp>=<sp>" ) . append ( actualValue ) . append ( ")" ) ; break ; case org . hyperic . hq . events . EventConstants . TYPE_CONTROL : text . append ( cond . describe ( dm ) ) ; break ; case org . hyperic . hq . events . EventConstants . TYPE_CHANGE : text . append ( cond . describe ( dm ) ) . append ( "<sp>(New<sp>value:<sp>" ) . append ( logs [ i ] . getValue ( ) ) . append ( ")" ) ; break ; case org . hyperic . hq . events . EventConstants . TYPE_CUST_PROP : text . append ( cond . describe ( dm ) ) . append ( "\n" ) . append ( indent ) . append ( logs [ i ] . getValue ( ) ) ; break ; case org . hyperic . hq . events . EventConstants . TYPE_LOG : text . append ( cond . describe ( dm ) ) . append ( "\n" ) . append ( indent ) . append ( "Log:<sp>" ) . append ( logs [ i ] . getValue ( ) ) ; break ; case org . hyperic . hq . events . EventConstants . TYPE_CFG_CHG : text . append ( cond . describe ( dm ) ) . append ( "\n" ) . append ( indent ) . append ( "Details:<sp>" ) . append ( logs [ i ] . getValue ( ) ) ; break ; default : break ; } }
|
org . junit . Assert . assertEquals ( "Incorrect<sp>Long<sp>Reason" , "Incorrect<sp>Long<sp>Reason" 1 , longReason )
|
manyOpenTransactions ( ) { org . cojen . tupl . Index ix = mDb . openIndex ( "test" ) ; org . cojen . tupl . Transaction [ ] txns = new org . cojen . tupl . Transaction [ 1000 ] ; for ( int i = 0 ; i < ( txns . length ) ; i ++ ) { txns [ i ] = mDb . newTransaction ( ) ; ix . store ( txns [ i ] , ( "key-" + i ) . getBytes ( ) , ( "value-" + i ) . getBytes ( ) ) ; } mDb . checkpoint ( ) ; mDb = reopenTempDatabase ( getClass ( ) , mDb , mConfig ) ; ix = mDb . openIndex ( "test" ) ; "<AssertPlaceHolder>" ; } count ( byte [ ] , byte [ ] ) { org . cojen . tupl . _TreeCursor cursor = newCursor ( Transaction . BOGUS ) ; org . cojen . tupl . _TreeCursor high = null ; try { if ( highKey != null ) { high = newCursor ( Transaction . BOGUS ) ; high . mKeyOnly = true ; high . find ( highKey ) ; if ( ( high . mKey ) == null ) { return 0 ; } } return cursor . count ( lowKey , high ) ; } finally { cursor . reset ( ) ; if ( high != null ) { high . reset ( ) ; } } }
|
org . junit . Assert . assertEquals ( 0 , ix . count ( null , null ) )
|
testShouldFindElementsByXPath ( ) { java . util . List < org . openqa . selenium . WebElement > listElem = driver . findElements ( org . openqa . selenium . By . xpath ( "//QLineEdit" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . Object response = executeMethod . execute ( DriverCommand . GET_LOCAL_STORAGE_SIZE , null ) ; return java . lang . Integer . parseInt ( response . toString ( ) ) ; }
|
org . junit . Assert . assertThat ( listElem . size ( ) , equalTo ( 3 ) )
|
testKvTags ( ) { se . svt . helios . serviceregistration . consul . List < java . lang . String > tags = se . svt . helios . serviceregistration . consul . Arrays . asList ( "tag1" , "key::value" , "tag2" , "key2::value2::2" ) ; se . svt . helios . serviceregistration . consul . Map < java . lang . String , java . lang . String > expected = new se . svt . helios . serviceregistration . consul . HashMap ( ) ; expected . put ( "key" , "value" ) ; expected . put ( "key2" , "value2::2" ) ; se . svt . helios . serviceregistration . consul . Map < java . lang . String , java . lang . String > actual = se . svt . helios . serviceregistration . consul . ConsulServiceUtilTest . serviceUtil . kvTags ( se . svt . helios . serviceregistration . consul . Utils . newEndpointBuilder ( ) . tags ( tags ) . protocol ( "http" ) . build ( ) ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . spotify . helios . serviceregistration . ServiceRegistration . Endpoint ( name , protocol , port , domain , host , tags , healthCheck ) ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . core . Is . is ( expected ) )
|
taskNotFound ( ) { com . fizzed . blaze . core . Blaze blaze = new com . fizzed . blaze . core . Blaze . Builder ( ) . dependencyResolver ( new com . fizzed . blaze . internal . NoopDependencyResolver ( ) ) . file ( resourceAsFile ( "/groovy/hello.groovy" ) ) . build ( ) ; try { blaze . execute ( "doesnotexist" ) ; org . junit . Assert . fail ( ) ; } catch ( com . fizzed . blaze . core . NoSuchTaskException e ) { "<AssertPlaceHolder>" ; } } getTask ( ) { return task ; }
|
org . junit . Assert . assertThat ( e . getTask ( ) , org . hamcrest . CoreMatchers . is ( "doesnotexist" ) )
|
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . Organization > organizations = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( organizations . isEmpty ( ) )
|
testGetObjectIdTwoObjects ( ) { com . sun . sgs . test . impl . service . data . TestDataServiceImpl . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) { com . sun . sgs . test . util . DummyManagedObject x = new com . sun . sgs . test . util . DummyManagedObject ( ) ; com . sun . sgs . test . util . DummyManagedObject y = new com . sun . sgs . test . util . DummyManagedObject ( ) ; "<AssertPlaceHolder>" ; } } , com . sun . sgs . test . impl . service . data . TestDataServiceImpl . taskOwner ) ; } getObjectId ( java . lang . Object ) { serviceStats . getObjectIdOp . report ( ) ; com . sun . sgs . impl . service . data . Context context = null ; try { com . sun . sgs . impl . service . data . DataServiceImpl . checkManagedObject ( object ) ; context = getContext ( ) ; java . math . BigInteger result = context . getReference ( object ) . getId ( ) ; if ( com . sun . sgs . impl . service . data . DataServiceImpl . logger . isLoggable ( Level . FINEST ) ) { com . sun . sgs . impl . service . data . DataServiceImpl . logger . log ( Level . FINEST , ( "getObjectId<sp>tid:{0,number,#},<sp>type:{1}" + "<sp>returns<sp>oid:{2,number,#}" ) , com . sun . sgs . impl . service . data . DataServiceImpl . contextTxnId ( context ) , com . sun . sgs . impl . service . data . DataServiceImpl . typeName ( object ) , result ) ; } return result ; } catch ( java . lang . RuntimeException e ) { com . sun . sgs . impl . sharedutil . LoggerWrapper exceptionLogger = com . sun . sgs . impl . service . data . DataServiceImpl . getExceptionLogger ( e ) ; if ( exceptionLogger . isLoggable ( Level . FINEST ) ) { exceptionLogger . logThrow ( Level . FINEST , e , "getObjectId<sp>tid:{0,number,#},<sp>type:{1}<sp>throws" , com . sun . sgs . impl . service . data . DataServiceImpl . contextTxnId ( context ) , com . sun . sgs . impl . service . data . DataServiceImpl . typeName ( object ) ) ; } throw e ; } }
|
org . junit . Assert . assertFalse ( com . sun . sgs . test . impl . service . data . TestDataServiceImpl . service . getObjectId ( x ) . equals ( com . sun . sgs . test . impl . service . data . TestDataServiceImpl . service . getObjectId ( y ) ) )
|
getPositionsByIdShouldReturnEmptyListWhenNoPositionsFoundWithTheGivenIds ( ) { java . util . List < java . lang . Long > ids = java . util . Arrays . asList ( com . epam . rft . atsy . service . impl . PositionServiceImplTest . NON_EXISTENT_ID ) ; given ( positionRepository . findAll ( ids ) ) . willReturn ( com . epam . rft . atsy . service . impl . PositionServiceImplTest . EMPTY_POSITION_ENTITY_LIST ) ; java . util . List < com . epam . rft . atsy . service . domain . PositionDTO > positionDTOs = positionService . getPositionsById ( ids ) ; "<AssertPlaceHolder>" ; } getPositionsById ( java . util . List ) { org . springframework . util . Assert . notNull ( ids ) ; java . util . List < com . epam . rft . atsy . persistence . entities . PositionEntity > positionEntities = positionRepository . findAll ( ids ) ; java . util . List < com . epam . rft . atsy . service . domain . PositionDTO > emptyList = java . util . Collections . emptyList ( ) ; return positionEntities . isEmpty ( ) ? emptyList : converterService . convert ( positionEntities , com . epam . rft . atsy . service . domain . PositionDTO . class ) ; }
|
org . junit . Assert . assertTrue ( positionDTOs . isEmpty ( ) )
|
testAssumeTypeBasedOnWhatIsIntheYamlWithSpace2 ( ) { net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB expected = new net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB ( "hello8" ) ; java . lang . Object actual = net . openhft . chronicle . wire . Marshallable . < net . openhft . chronicle . wire . InvalidYamWithCommonMistakesTest . DtoB > fromString ( ( "<sp>!net.openhft.chronicle.wire.InvalidYamWithCommonMistakesTest$DtoB<sp>{\n" + ( "<sp>y:hello8\n" + "}\n" ) ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testCreateSettingsPanel ( ) { System . out . println ( "createSettingsPanel" ) ; kg . apc . jmeter . vizualizers . ResponseTimesDistributionGui instance = new kg . apc . jmeter . vizualizers . ResponseTimesDistributionGui ( ) ; kg . apc . jmeter . vizualizers . JSettingsPanel result = instance . createSettingsPanel ( ) ; "<AssertPlaceHolder>" ; } createSettingsPanel ( ) { return new kg . apc . jmeter . vizualizers . JSettingsPanel ( this , ( ( ( ( ( ( ( JSettingsPanel . TIMELINE_OPTION ) | ( JSettingsPanel . GRADIENT_OPTION ) ) | ( JSettingsPanel . FINAL_ZEROING_OPTION ) ) | ( JSettingsPanel . LIMIT_POINT_OPTION ) ) | ( JSettingsPanel . MAXY_OPTION ) ) | ( JSettingsPanel . RELATIVE_TIME_OPTION ) ) | ( JSettingsPanel . MARKERS_OPTION ) ) ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
checkCopy ( ) { fixture = new com . flagstone . transform . action . SetTarget ( com . flagstone . transform . action . SetTargetTest . TARGET ) ; final com . flagstone . transform . action . SetTarget copy = fixture . copy ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return java . lang . String . format ( com . flagstone . transform . LimitScript . FORMAT , depth , timeout ) ; }
|
org . junit . Assert . assertEquals ( fixture . toString ( ) , copy . toString ( ) )
|
testAllPoolsOfflineIPv6 ( ) { _ci . command ( "psu<sp>set<sp>allpoolsactive<sp>off" ) ; org . dcache . vehicles . FileAttributes fileAttributes = new org . dcache . vehicles . FileAttributes ( ) ; diskCacheV111 . vehicles . StorageInfos . injectInto ( diskCacheV111 . vehicles . GenericStorageInfo . valueOf ( "*" , "*" ) , fileAttributes ) ; diskCacheV111 . poolManager . PoolPreferenceLevel [ ] preference = _psu . match ( DirectionType . READ , "2001:638:700::f00:ba" , null , fileAttributes , null ) ; int found = 0 ; for ( diskCacheV111 . poolManager . PoolPreferenceLevel level : preference ) { found += level . getPoolList ( ) . size ( ) ; } "<AssertPlaceHolder>" ; } size ( ) { return _hash . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , found )
|
testGetExpectedVersion ( ) { "<AssertPlaceHolder>" ; } getExpectedVersion ( ) { return ExecutionDataWriter . FORMAT_VERSION ; }
|
org . junit . Assert . assertEquals ( ExecutionDataWriter . FORMAT_VERSION , exception . getExpectedVersion ( ) )
|
one_$parent_array_range_projection_with_no_match_returns_empty_node_projection ( ) { com . redhat . lightblue . query . Projection p = com . redhat . lightblue . eval . EvalTestContext . projectionFromJson ( "{'field':'field6.$parent.field7','range':[5,6],'projection':{'field':'elemf3'}}" ) ; com . redhat . lightblue . eval . Projector projector = com . redhat . lightblue . eval . Projector . getInstance ( p , md ) ; com . fasterxml . jackson . databind . JsonNode expectedNode = com . redhat . lightblue . util . JsonUtils . json ( "{}" . replace ( '\'' , '\"' ) ) ; com . redhat . lightblue . util . JsonDoc pdoc = projector . project ( jsonDoc , com . redhat . lightblue . eval . JSON_NODE_FACTORY ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ops [ 0 ] ; }
|
org . junit . Assert . assertEquals ( expectedNode . toString ( ) , pdoc . toString ( ) )
|
testSerialization ( ) { org . jfree . chart . axis . CategoryTick t1 = new org . jfree . chart . axis . CategoryTick ( "C1" , new org . jfree . text . TextBlock ( ) , org . jfree . text . TextBlockAnchor . CENTER , org . jfree . ui . TextAnchor . CENTER , 1.5F ) ; org . jfree . chart . axis . CategoryTick t2 = ( ( org . jfree . chart . axis . CategoryTick ) ( org . jfree . chart . TestUtilities . serialised ( t1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( t1 , t2 )
|
deveObterIcmsSN500ComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSSN500 icmsSetado = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSSN500 ( ) ; icms . setIcmssn500 ( icmsSetado ) ; "<AssertPlaceHolder>" ; } getIcmssn500 ( ) { return this . icmssn500 ; }
|
org . junit . Assert . assertEquals ( icmsSetado , icms . getIcmssn500 ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.