input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testGetFontAfterDisposingFont ( ) { org . eclipse . swt . widgets . Control control = new org . eclipse . swt . widgets . Label ( shell , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . graphics . Font font = new org . eclipse . swt . graphics . Font ( display , "font-name" , 10 , org . eclipse . swt . SWT . NONE ) ; control . setFont ( font ) ; font . dispose ( ) ; org . eclipse . swt . graphics . Font returnedFont = control . getFont ( ) ; "<AssertPlaceHolder>" ; } getFont ( ) { checkWidget ( ) ; handleVirtual ( ) ; org . eclipse . swt . graphics . Font defaultFont = getItemData ( ) . defaultFont ; return defaultFont == null ? parent . getFont ( ) : defaultFont ; }
org . junit . Assert . assertSame ( font , returnedFont )
test_getById ( ) { releaseEntity . setId ( 1 ) ; service . saveReleaseEntity ( releaseEntity ) ; ch . puzzle . itc . mobiliar . business . releasing . entity . ReleaseEntity release = service . getById ( 1 ) ; "<AssertPlaceHolder>" ; } getById ( int ) { return entityManager . find ( ch . puzzle . itc . mobiliar . business . releasing . entity . ReleaseEntity . class , id ) ; }
org . junit . Assert . assertNotNull ( release )
shouldGetAllCookies ( ) { java . util . Set allCookies = cookieManager . getAll ( ) ; verify ( mockOptions ) . getCookies ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return driver . manage ( ) . getCookies ( ) . stream ( ) . map ( this :: transformToDarcyCookie ) . collect ( java . util . stream . Collectors . toSet ( ) ) ; }
org . junit . Assert . assertTrue ( allCookies . isEmpty ( ) )
testBuildWithDisabledSecurityCosntraint ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . optype . OperationType context = new org . lnu . is . domain . optype . OperationType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>OperationType<sp>e<sp>WHERE<sp>e.status=:status<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . optype . OperationType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
createEndOutboundProcessing ( ) { gov . hhs . fha . nhinc . event . Event event = eventFactory . createEndOutboundProcessing ( ) ; "<AssertPlaceHolder>" ; } createEndOutboundProcessing ( ) { return new gov . hhs . fha . nhinc . event . initiator . EndOutboundProcessingEvent ( ) ; }
org . junit . Assert . assertTrue ( ( event instanceof gov . hhs . fha . nhinc . event . initiator . EndOutboundProcessingEvent ) )
testGetCollisionString ( ) { System . out . println ( "Test<sp>getCollisionString-DJBX33A" ) ; int i = 4 - 1 ; int n = 2 ; wsattacker . plugin . dos . dosExtension . attackClasses . hashDos . CollisionDJBX33A instance = new wsattacker . plugin . dos . dosExtension . attackClasses . hashDos . CollisionDJBX33A ( ) ; java . lang . String expResult = "C8C8" ; java . lang . String result = instance . getCollisionString ( i , n ) ; "<AssertPlaceHolder>" ; } getCollisionString ( int , int ) { return "" ; }
org . junit . Assert . assertEquals ( expResult , result )
testCameraIsSingleton ( ) { com . eclipsesource . tabris . TabrisClient client = new com . eclipsesource . tabris . internal . TabrisClientImpl ( ) ; com . eclipsesource . tabris . camera . Camera camera = client . getService ( com . eclipsesource . tabris . camera . Camera . class ) ; com . eclipsesource . tabris . camera . Camera camera2 = client . getService ( com . eclipsesource . tabris . camera . Camera . class ) ; "<AssertPlaceHolder>" ; } getService ( java . lang . Class ) { T result = null ; if ( type == ( com . eclipsesource . tabris . interaction . AppLauncher . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . AppLauncherImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . app . App . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . AppImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . ClientStore . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . ClientStoreImpl . class ) ) ) ; } else if ( ( type == ( com . eclipsesource . tabris . device . ClientDevice . class ) ) || ( type == ( org . eclipse . rap . rwt . client . service . ClientInfo . class ) ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . ClientDeviceImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . push . CloudPush . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . CloudPushImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . camera . Camera . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . CameraImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . camera . PhotoAlbum . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . PhotoAlbumImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . geolocation . Geolocation . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . GeolocationImpl . class ) ) ) ; } else if ( type == ( com . eclipsesource . tabris . print . Printer . class ) ) { result = ( ( T ) ( getSessionInstance ( com . eclipsesource . tabris . internal . PrinterImpl . class ) ) ) ; } else if ( type == ( org . eclipse . rap . rwt . client . service . StartupParameters . class ) ) { result = ( ( T ) ( getSessionInstance ( org . eclipse . rap . rwt . internal . client . StartupParametersImpl . class ) ) ) ; } return result ; }
org . junit . Assert . assertSame ( camera , camera2 )
testRemove ( ) { com . liferay . portal . security . service . access . policy . model . SAPEntry newSAPEntry = addSAPEntry ( ) ; _persistence . remove ( newSAPEntry ) ; com . liferay . portal . security . service . access . policy . model . SAPEntry existingSAPEntry = _persistence . fetchByPrimaryKey ( newSAPEntry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingSAPEntry )
testTypeParameterInferenceForward ( ) { org . apache . beam . sdk . coders . CoderRegistry registry = org . apache . beam . sdk . coders . CoderRegistry . createDefault ( ) ; org . apache . beam . sdk . coders . CoderRegistryTest . MyGenericClass < org . apache . beam . sdk . coders . CoderRegistryTest . MyValue , java . util . List < org . apache . beam . sdk . coders . CoderRegistryTest . MyValue > > instance = new org . apache . beam . sdk . coders . CoderRegistryTest . MyGenericClass < org . apache . beam . sdk . coders . CoderRegistryTest . MyValue , java . util . List < org . apache . beam . sdk . coders . CoderRegistryTest . MyValue > > ( ) { } ; org . apache . beam . sdk . coders . Coder < ? > bazCoder = registry . getCoder ( instance . getClass ( ) , org . apache . beam . sdk . coders . CoderRegistryTest . MyGenericClass . class , java . util . Collections . < java . lang . reflect . Type , org . apache . beam . sdk . coders . Coder < ? > > singletonMap ( org . apache . beam . sdk . values . TypeDescriptor . of ( org . apache . beam . sdk . coders . CoderRegistryTest . MyGenericClass . class ) . getTypeParameter ( "FooT" ) , org . apache . beam . sdk . coders . CoderRegistryTest . MyValueCoder . of ( ) ) , org . apache . beam . sdk . values . TypeDescriptor . of ( org . apache . beam . sdk . coders . CoderRegistryTest . MyGenericClass . class ) . getTypeParameter ( "BazT" ) ) ; "<AssertPlaceHolder>" ; } of ( org . apache . beam . sdk . coders . Coder ) { return new org . apache . beam . sdk . coders . ListCoder ( elemCoder ) ; }
org . junit . Assert . assertEquals ( org . apache . beam . sdk . coders . ListCoder . of ( org . apache . beam . sdk . coders . CoderRegistryTest . MyValueCoder . of ( ) ) , bazCoder )
testIsOrdered2 ( ) { org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . msg = org . dresdenocl . modelinstancetype . test . msg . ModelInstanceTypeTestSuiteMessages . TestModelInstanceCollection_IsOrderedIsWrong ; org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . msg = org . eclipse . osgi . util . NLS . bind ( org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . msg , org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . type_orderedset , "" ) ; for ( org . dresdenocl . modelinstancetype . types . IModelInstanceCollection < ? > aCollection : org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . instances_orderedset ) { "<AssertPlaceHolder>" ; } isOrdered ( ) { boolean result ; org . dresdenocl . essentialocl . types . CollectionType collectionType = ( ( org . dresdenocl . essentialocl . types . CollectionType ) ( this . myType ) ) ; if ( ( ( collectionType . getKind ( ) ) == ( org . dresdenocl . essentialocl . expressions . CollectionKind . SEQUENCE ) ) || ( ( collectionType . getKind ( ) ) == ( org . dresdenocl . essentialocl . expressions . CollectionKind . ORDERED_SET ) ) ) { result = true ; } else { result = false ; } return result ; }
org . junit . Assert . assertTrue ( org . dresdenocl . modelinstancetype . test . tests . TestModelInstanceCollection . msg , aCollection . isOrdered ( ) )
yesterday ( ) { long tolerance = 500 ; java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . add ( Calendar . DAY_OF_MONTH , ( - 1 ) ) ; long expected = cal . getTimeInMillis ( ) ; long actual = org . candlepin . util . Util . yesterday ( ) . getTime ( ) ; "<AssertPlaceHolder>" ; } yesterday ( ) { long tolerance = 500 ; java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . add ( Calendar . DAY_OF_MONTH , ( - 1 ) ) ; long expected = cal . getTimeInMillis ( ) ; long actual = org . candlepin . util . Util . yesterday ( ) . getTime ( ) ; org . junit . Assert . assertTrue ( ( ( actual - expected ) <= tolerance ) ) ; }
org . junit . Assert . assertTrue ( ( ( actual - expected ) <= tolerance ) )
classInTheMiddleHasNoFields ( ) { nl . jqno . equalsverifier . internal . reflection . Set < java . lang . reflect . Field > expected = new nl . jqno . equalsverifier . internal . reflection . HashSet ( ) ; expected . addAll ( nl . jqno . equalsverifier . internal . reflection . FieldIterableTest . FIELD_CONTAINER_FIELDS ) ; expected . add ( nl . jqno . equalsverifier . internal . reflection . SubEmptySubFieldContainer . class . getDeclaredField ( "field" ) ) ; nl . jqno . equalsverifier . internal . reflection . Set < java . lang . reflect . Field > actual = new nl . jqno . equalsverifier . internal . reflection . HashSet ( ) ; for ( java . lang . reflect . Field field : nl . jqno . equalsverifier . internal . reflection . FieldIterable . of ( nl . jqno . equalsverifier . internal . reflection . SubEmptySubFieldContainer . class ) ) { actual . add ( field ) ; } "<AssertPlaceHolder>" ; } of ( java . lang . Class ) { return new nl . jqno . equalsverifier . internal . reflection . FieldIterable ( type , true ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testIoSetGroupMenu ( ) { "<AssertPlaceHolder>" ; return ; }
org . junit . Assert . assertEquals ( true , true )
testOnlyServiceHasNameForAggregates ( ) { setServiceNameForCrossEntityAggregates ( "aggregate_for_service" ) ; "<AssertPlaceHolder>" ; } validate ( com . cloudera . csd . validation . monitoring . MonitoringValidationContext , com . cloudera . csd . descriptors . MetricEntityAttributeDescriptor , com . cloudera . csd . validation . references . components . DescriptorPathImpl ) { com . google . common . base . Preconditions . checkNotNull ( context ) ; com . google . common . base . Preconditions . checkNotNull ( attribute ) ; com . google . common . base . Preconditions . checkNotNull ( path ) ; path = constructPathFromProperty ( attribute , "name" , path ) ; java . lang . String attributeName = attribute . getName ( ) ; java . lang . String serviceName = context . serviceDescriptor . getName ( ) . toLowerCase ( ) ; if ( ( ! ( attributeName . startsWith ( serviceName ) ) ) && ( ! ( builtInAttributes . contains ( attributeName ) ) ) ) { java . lang . String msg = java . lang . String . format ( "Attribute<sp>'%s'<sp>does<sp>not<sp>start<sp>with<sp>the<sp>service<sp>name<sp>('%s')" , attributeName , serviceName ) ; return forViolation ( msg , attribute , attributeName , path ) ; } return noViolations ( ) ; }
org . junit . Assert . assertTrue ( validator . validate ( context , serviceDescriptor , root ) . isEmpty ( ) )
testIsDateTimeCapable ( ) { "<AssertPlaceHolder>" ; } isDateTimeCapable ( ) { return baseType . isDateTimeCapable ( ) ; }
org . junit . Assert . assertTrue ( type . isDateTimeCapable ( ) )
whenFileIsFreshlyAdded_isNewAttributeShouldBeTrue ( ) { initGitFileSystem ( ) ; java . nio . file . Files . write ( gfs . getPath ( "/some_file.txt" ) , someBytes ( ) ) ; "<AssertPlaceHolder>" ; } isNew ( java . lang . String ) { return ( ( boolean ) ( readAttribute ( path , com . beijunyi . parallelgit . filesystem . io . IS_NEW ) ) ) ; }
org . junit . Assert . assertTrue ( isNew ( "/some_file.txt" ) )
testNoHistory ( ) { org . yakindu . sct . model . sexec . transformation . test . SCTTestUtil . SimpleFlatTSC sc = new org . yakindu . sct . model . sexec . transformation . test . SCTTestUtil . SimpleFlatTSC ( ) ; org . yakindu . sct . model . sexec . ExecutionFlow flow = sequencer . transform ( sc . sc ) ; "<AssertPlaceHolder>" ; } getHistoryVector ( ) { return historyVector ; }
org . junit . Assert . assertNull ( flow . getHistoryVector ( ) )
startProcess ( ) { org . activiti . engine . RepositoryService repositoryService = activitiRule . getRepositoryService ( ) ; repositoryService . createDeployment ( ) . addInputStream ( "SequenceFlowWithCondition.bpmn20.xml" , new java . io . FileInputStream ( filename ) ) . deploy ( ) ; org . activiti . engine . RuntimeService runtimeService = activitiRule . getRuntimeService ( ) ; java . util . Map < java . lang . String , java . lang . Object > variableMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variableMap . put ( "name" , "Activiti" ) ; org . activiti . engine . runtime . ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "SequenceFlowWithCondition" , variableMap ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( "id<sp>" + ( processInstance . getId ( ) ) ) + "<sp>" ) + ( processInstance . getProcessDefinitionId ( ) ) ) ) ; }
org . junit . Assert . assertNotNull ( processInstance . getId ( ) )
testParseNegativeY ( ) { java . lang . String source = ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323}" ; org . hipparchus . geometry . euclidean . oned . Vector1D expected = new org . hipparchus . geometry . euclidean . oned . Vector1D ( 1.2323 ) ; org . hipparchus . geometry . euclidean . oned . Vector1D actual = vector1DFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { java . text . ParsePosition parsePosition = new java . text . ParsePosition ( 0 ) ; org . hipparchus . geometry . euclidean . twod . Vector2D result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { throw new org . hipparchus . exception . MathIllegalStateException ( org . hipparchus . exception . LocalizedCoreFormats . CANNOT_PARSE_AS_TYPE , source , parsePosition . getErrorIndex ( ) , org . hipparchus . geometry . euclidean . twod . Vector2D . class ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , actual )
testRegistrationOfExecutionsFailedExternally ( ) { try { final org . apache . flink . runtime . jobgraph . JobVertexID jid1 = new org . apache . flink . runtime . jobgraph . JobVertexID ( ) ; final org . apache . flink . runtime . jobgraph . JobVertexID jid2 = new org . apache . flink . runtime . jobgraph . JobVertexID ( ) ; org . apache . flink . runtime . jobgraph . JobVertex v1 = new org . apache . flink . runtime . jobgraph . JobVertex ( "v1" , jid1 ) ; org . apache . flink . runtime . jobgraph . JobVertex v2 = new org . apache . flink . runtime . jobgraph . JobVertex ( "v2" , jid2 ) ; java . util . Map < org . apache . flink . runtime . executiongraph . ExecutionAttemptID , org . apache . flink . runtime . executiongraph . Execution > executions = setupExecution ( v1 , 7 , v2 , 6 ) . f1 ; for ( org . apache . flink . runtime . executiongraph . Execution e : executions . values ( ) ) { e . fail ( null ) ; } "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } size ( ) { return routes . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , executions . size ( ) )
testCumSumBP ( ) { for ( boolean exclusive : new boolean [ ] { false , true } ) { for ( boolean reverse : new boolean [ ] { false , true } ) { org . nd4j . linalg . api . ndarray . INDArray preReduceInput = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 12 , 12 ) . reshape ( 3 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray dLdOut = org . nd4j . linalg . factory . Nd4j . valueArrayOf ( new long [ ] { 3 , 4 } , 0.5 ) ; org . nd4j . linalg . api . ndarray . INDArray dLdIn = org . nd4j . linalg . factory . Nd4j . createUninitialized ( 3 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray dLdInExpected ; if ( exclusive ) { if ( reverse ) { dLdInExpected = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 0.0 , 0.0 , 0.0 , 0.0 } , new double [ ] { 0.5 , 0.5 , 0.5 , 0.5 } , new double [ ] { 1.0 , 1.0 , 1.0 , 1.0 } } ) ; } else { dLdInExpected = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 1.0 , 1.0 , 1.0 , 1.0 } , new double [ ] { 0.5 , 0.5 , 0.5 , 0.5 } , new double [ ] { 0.0 , 0.0 , 0.0 , 0.0 } } ) ; } } else { if ( reverse ) { dLdInExpected = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 0.5 , 0.5 , 0.5 , 0.5 } , new double [ ] { 1.0 , 1.0 , 1.0 , 1.0 } , new double [ ] { 1.5 , 1.5 , 1.5 , 1.5 } } ) ; } else { dLdInExpected = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 1.5 , 1.5 , 1.5 , 1.5 } , new double [ ] { 1.0 , 1.0 , 1.0 , 1.0 } , new double [ ] { 0.5 , 0.5 , 0.5 , 0.5 } } ) ; } } java . lang . String err = org . nd4j . autodiff . validation . OpValidation . validate ( new org . nd4j . autodiff . validation . OpTestCase ( new org . nd4j . autodiff . opvalidation . CumSumBp ( preReduceInput , dLdOut , dLdIn , exclusive , reverse , 0 ) ) . expectedOutput ( 0 , dLdInExpected ) ) ; if ( err != null ) { err = ( ( ( err + "<sp>-<sp>exclusive=" ) + exclusive ) + ",<sp>reverse=" ) + reverse ; } "<AssertPlaceHolder>" ; } } } expectedOutput ( int , org . nd4j . linalg . api . ndarray . INDArray ) { testFns . put ( outputNum , new org . nd4j . autodiff . validation . functions . EqualityFn ( expected ) ) ; expShapes . put ( outputNum , expected . shapeDescriptor ( ) ) ; return this ; }
org . junit . Assert . assertNull ( err )
testDeactivateUser ( ) { java . text . SimpleDateFormat dateFormat = new java . text . SimpleDateFormat ( "milenaAz" 0 ) ; json . put ( "milenaAz" 3 , "milenaAz" ) ; json . put ( "firstname" , "milenaAz" 2 ) ; json . put ( "milenaAz" 5 , "Azwidou" ) ; json . put ( "milenaAz" 1 , "milenaAz" 6 ) ; json . put ( "12345" 0 , "milena@gmail.com" ) ; json . put ( "milenaAz" 7 , dateFormat . format ( new java . util . Date ( ) ) ) ; json . put ( "hometown" , "kabala" ) ; json . put ( "milenaAz" 8 , "milenaAz" 8 ) ; json . put ( "enabled" , true ) ; json . put ( "hasRoom" , true ) ; json . put ( "milenaAz" 9 , "12345" ) ; com . tech . models . entities . user . User tempUser = new com . tech . models . entities . user . User ( 2L , "milenaAz" , "12345" , true , true ) ; com . tech . models . entities . user . UserInfo tempUserInfo = new com . tech . models . entities . user . UserInfo ( 2L , "milena@gmail.com" , "milenaAz" 6 , "milenaAz" 8 , "Azwidou" , new java . util . Date ( ) , "kabala" , "milenaAz" 2 ) ; when ( userService . checkUsername ( "milenaAz" ) ) . thenReturn ( Boolean . TRUE ) ; when ( userService . getUserByUsername ( "milenaAz" ) ) . thenReturn ( tempUser ) ; when ( userInfoService . getUserInfoByUserId ( tempUser . getId ( ) ) ) . thenReturn ( tempUserInfo ) ; doNothing ( ) . when ( userService ) . modifyUser ( any ( com . tech . models . entities . user . User . class ) ) ; doNothing ( ) . when ( userInfoService ) . modifyUserInfo ( any ( com . tech . models . entities . user . UserInfo . class ) ) ; org . springframework . test . web . servlet . MvcResult result = mvc . perform ( org . springframework . test . web . servlet . request . MockMvcRequestBuilders . get ( ( ( uri ) + "/milenaAz/modify" ) ) . content ( json . toJSONString ( ) ) . contentType ( MediaType . APPLICATION_JSON ) ) . andReturn ( ) ; int status = result . getResponse ( ) . getStatus ( ) ; verify ( userService , times ( 1 ) ) . checkUsername ( "milenaAz" ) ; verify ( userService , times ( 1 ) ) . getUserByUsername ( "milenaAz" ) ; verify ( userService , times ( 1 ) ) . modifyUser ( any ( com . tech . models . entities . user . User . class ) ) ; verify ( userInfoService , times ( 1 ) ) . modifyUserInfo ( any ( com . tech . models . entities . user . UserInfo . class ) ) ; "<AssertPlaceHolder>" ; } modifyUserInfo ( com . tech . models . entities . user . UserInfo ) { repository . setUserInfoById ( modifiedUser . getFirstName ( ) , modifiedUser . getLastName ( ) , modifiedUser . getBirthday ( ) , modifiedUser . getEmail ( ) , modifiedUser . getStatus ( ) , modifiedUser . getProfilePhoto ( ) , modifiedUser . getHometown ( ) , modifiedUser . getUserid ( ) ) ; }
org . junit . Assert . assertTrue ( "milenaAz" 4 , ( status == 200 ) )
isItemNameChanged ( ) { org . uberfire . ext . widgets . core . client . tree . TreeItem oldItem = mockOldItem ( ) ; when ( oldItem . getLabel ( ) ) . thenReturn ( "OLD_ITEM" ) ; boolean isItemChanged = testedTreeExplorerView . isItemChanged ( org . kie . workbench . common . stunner . client . widgets . explorer . tree . TreeExplorerViewTest . ITEM_UUID , org . kie . workbench . common . stunner . client . widgets . explorer . tree . TreeExplorerViewTest . PARENT_UUID , org . kie . workbench . common . stunner . client . widgets . explorer . tree . TreeExplorerViewTest . NAME , java . util . OptionalInt . empty ( ) ) ; "<AssertPlaceHolder>" ; } isItemChanged ( java . lang . String , java . lang . String , java . lang . String , java . util . OptionalInt ) { final org . uberfire . ext . widgets . core . client . tree . TreeItem oldItem = tree . getItemByUuid ( uuid ) ; if ( oldItem != null ) { if ( isNameChanged ( ) . test ( oldItem , name ) ) { return true ; } final org . uberfire . ext . widgets . core . client . tree . TreeItem oldItemParent = oldItem . getParentItem ( ) ; final java . lang . String oldParentUuid = ( null != oldItemParent ) ? oldItemParent . getUuid ( ) : null ; return ( ( ( oldParentUuid == null ) && ( parentUuid == null ) ) || ( ( null != parentUuid ) && ( ! ( parentUuid . equals ( oldParentUuid ) ) ) ) ) || ( isIndexChanged ( ) . test ( oldItem , index ) ) ; } return false ; }
org . junit . Assert . assertTrue ( isItemChanged )
findProcessesCallbackReturningNullCorrectly ( ) { org . springframework . data . redis . core . RedisKeyValueTemplateTests . Person rand = new org . springframework . data . redis . core . RedisKeyValueTemplateTests . Person ( ) ; rand . firstname = "rand" ; org . springframework . data . redis . core . RedisKeyValueTemplateTests . Person mat = new org . springframework . data . redis . core . RedisKeyValueTemplateTests . Person ( ) ; mat . firstname = "mat" ; template . insert ( rand ) ; template . insert ( mat ) ; java . util . List < org . springframework . data . redis . core . RedisKeyValueTemplateTests . Person > result = template . find ( ( connection ) -> null , org . springframework . data . redis . core . RedisKeyValueTemplateTests . Person . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return delegate . size ( ) ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
deveObterNumeroProtocoloComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . NFInfoEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe400 . classes . evento . NFInfoEventoRetorno ( ) ; final java . lang . String numeroProtocolo = "132456789" ; eventoRetorno . setNumeroProtocolo ( numeroProtocolo ) ; "<AssertPlaceHolder>" ; } getNumeroProtocolo ( ) { return this . numeroProtocolo ; }
org . junit . Assert . assertEquals ( numeroProtocolo , eventoRetorno . getNumeroProtocolo ( ) )
doTrimAll_A$String_StringIsNull ( ) { org . junithelper . core . filter . TrimFilterManager target = new org . junithelper . core . filter . TrimFilterManager ( ) ; java . lang . String src = null ; java . lang . String actual = target . doTrimAll ( src ) ; java . lang . String expected = null ; "<AssertPlaceHolder>" ; } doTrimAll ( java . lang . String ) { java . lang . String dest = src ; for ( org . junithelper . core . filter . TrimFilter filter : filters ) { dest = filter . trimAll ( dest ) ; } return dest ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testRockerCompilerConfIsGeneratedInClassesDirectory ( ) { org . gradle . api . Project project = org . gradle . testfixtures . ProjectBuilder . builder ( ) . build ( ) ; project . getPluginManager ( ) . apply ( com . fizzed . rocker . gradle . RockerPlugin . class ) ; com . fizzed . rocker . gradle . RockerTask . doCompileRocker ( project , new java . io . File ( "src/test/java" ) , new java . io . File ( "build/generated/source/apt/main" ) , new java . io . File ( "build/classes/main" ) ) ; java . io . File templateFile = new java . io . File ( "build/classes/main/rocker-compiler.conf" ) ; "<AssertPlaceHolder>" ; } doCompileRocker ( org . gradle . api . Project , java . io . File , java . io . File , java . io . File ) { com . fizzed . rocker . gradle . RockerConfiguration ext = ( ( com . fizzed . rocker . gradle . RockerConfiguration ) ( project . getExtensions ( ) . findByName ( "rocker" ) ) ) ; com . fizzed . rocker . gradle . RockerTask . runJavaGeneratorMain ( ext , templateDir , outputDir , classDir ) ; }
org . junit . Assert . assertTrue ( templateFile . exists ( ) )
manyForms ( ) { final boolean DUMP_PIDS = false ; org . activiti . engine . repository . ProcessDefinition def = engine . getRepositoryService ( ) . createProcessDefinitionQuery ( ) . processDefinitionKey ( "cform3" ) . singleResult ( ) ; if ( def == null ) { deployForm ( "Form3" ) ; def = engine . getRepositoryService ( ) . createProcessDefinitionQuery ( ) . processDefinitionKey ( "cform3" ) . singleResult ( ) ; } createProcessDefinition ( def ) ; final java . util . Map < java . lang . String , java . lang . Object > values = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > of ( "1" , "1" , "a_1" , "2" ) ; final java . lang . String id = def . getId ( ) ; final org . activiti . engine . impl . ServiceImpl formService = ( ( org . activiti . engine . impl . ServiceImpl ) ( engine . getFormService ( ) ) ) ; int N = 120 ; final java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final java . util . List < java . util . concurrent . Future < java . lang . String > > futures = new java . util . ArrayList < java . util . concurrent . Future < java . lang . String > > ( ) ; for ( int i = 1 ; i <= N ; i ++ ) { final java . util . concurrent . Future < java . lang . String > future = executor . submit ( new java . util . concurrent . Callable < java . lang . String > ( ) { @ ru . codeinside . gses . activiti . Override public java . lang . String call ( ) throws ru . codeinside . gses . activiti . Exception { ru . codeinside . gses . service . BidID bidID = formService . getCommandExecutor ( ) . execute ( new ru . codeinside . gses . activiti . SubmitStartFormCommand ( null , null , id , values , null , "x" , null , null ) { void setExecutionDates ( ru . codeinside . adm . database . Bid bid , org . activiti . engine . impl . persistence . entity . ExecutionEntity processInstance ) { } } ) ; return java . lang . Long . toString ( bidID . bidId ) ; } } ) ; futures . add ( future ) ; } int ok = 0 ; for ( final java . util . concurrent . Future < java . lang . String > future : futures ) { try { java . lang . String pid = future . get ( 1 , TimeUnit . MINUTES ) ; if ( DUMP_PIDS ) { System . out . print ( ( "<sp>" + pid ) ) ; } ok ++ ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; break ; } catch ( java . util . concurrent . ExecutionException e ) { e . printStackTrace ( ) ; break ; } catch ( java . util . concurrent . TimeoutException e ) { e . printStackTrace ( ) ; break ; } } executor . shutdownNow ( ) ; "<AssertPlaceHolder>" ; } printStackTrace ( ) { delegate . printStackTrace ( ) ; }
org . junit . Assert . assertEquals ( N , ok )
testTest ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( true , true )
name ( ) { "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "name" , instance . getName ( ) )
makeSureLuceneIndexesReportAsWriteable ( ) { org . neo4j . graphdb . index . Index < org . neo4j . graphdb . Node > index = nodeIndex ( LuceneIndexImplementation . FULLTEXT_CONFIG ) ; org . neo4j . graphdb . Node node = graphDb . createNode ( ) ; index . add ( node , "key" , "value" ) ; "<AssertPlaceHolder>" ; } isWriteable ( ) { return false ; }
org . junit . Assert . assertTrue ( index . isWriteable ( ) )
test_bs_save2_3 ( ) { org . jerlang . type . Atom expected = org . jerlang . type . Atom . of ( "c" ) ; org . jerlang . type . List params = org . jerlang . type . List . of ( new org . jerlang . type . Binary ( new int [ ] { 255 } ) ) ; org . jerlang . type . Term result = org . jerlang . erts . Erlang . apply ( org . jerlang . type . Atom . of ( "bs_save2" ) , org . jerlang . type . Atom . of ( "test" ) , params ) ; "<AssertPlaceHolder>" ; } of ( byte [ ] ) { return org . jerlang . type . Atom . of ( new java . lang . String ( bytes , ISO_8859_1 ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testSanity ( ) { com . google . inject . Injector stageOne = org . apache . druid . guice . GuiceInjectors . makeStartupInjector ( ) ; com . google . inject . Module module = stageOne . getInstance ( org . apache . druid . guice . DruidSecondaryModule . class ) ; com . google . inject . Injector stageTwo = com . google . inject . Guice . createInjector ( module , new com . google . inject . Module ( ) { @ org . apache . druid . guice . Override public void configure ( com . google . inject . Binder binder ) { binder . bind ( java . lang . String . class ) . toInstance ( "Expected<sp>String" ) ; org . apache . druid . guice . JsonConfigProvider . bind ( binder , "druid.emitter." , org . apache . druid . guice . GuiceInjectorsTest . Emitter . class ) ; binder . bind ( org . apache . druid . guice . GuiceInjectorsTest . CustomEmitter . class ) . toProvider ( new org . apache . druid . guice . GuiceInjectorsTest . CustomEmitterFactory ( ) ) ; } } ) ; org . apache . druid . guice . GuiceInjectorsTest . CustomEmitter customEmitter = stageTwo . getInstance ( org . apache . druid . guice . GuiceInjectorsTest . CustomEmitter . class ) ; "<AssertPlaceHolder>" ; } getOtherValue ( ) { return emitter . getValue ( ) ; }
org . junit . Assert . assertEquals ( "Expected<sp>String" , customEmitter . getOtherValue ( ) )
testUpdateStorageUnitNotificationRegistrationTrimParameters ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey notificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; notificationRegistrationServiceTestHelper . createDatabaseEntitiesForStorageUnitNotificationRegistrationTesting ( org . finra . herd . service . NAMESPACE , java . util . Arrays . asList ( NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) , NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) ) , org . finra . herd . service . BDEF_NAMESPACE_2 , org . finra . herd . service . BDEF_NAME_2 , java . util . Arrays . asList ( org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE_2 ) , java . util . Arrays . asList ( org . finra . herd . service . STORAGE_NAME , org . finra . herd . service . STORAGE_NAME_2 ) , java . util . Arrays . asList ( org . finra . herd . service . STORAGE_UNIT_STATUS , org . finra . herd . service . STORAGE_UNIT_STATUS_2 , org . finra . herd . service . STORAGE_UNIT_STATUS_3 , org . finra . herd . service . STORAGE_UNIT_STATUS_4 ) , notificationRegistrationDaoTestHelper . getTestJobActions2 ( ) ) ; notificationRegistrationDaoTestHelper . createStorageUnitNotificationRegistrationEntity ( notificationRegistrationKey , NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) , org . finra . herd . service . BDEF_NAMESPACE , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . FORMAT_USAGE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . FORMAT_VERSION , org . finra . herd . service . STORAGE_NAME , org . finra . herd . service . STORAGE_UNIT_STATUS , org . finra . herd . service . STORAGE_UNIT_STATUS_2 , notificationRegistrationDaoTestHelper . getTestJobActions ( ) , NotificationRegistrationStatusEntity . ENABLED ) ; org . finra . herd . model . api . xml . StorageUnitNotificationRegistration resultStorageUnitNotificationRegistration = storageUnitNotificationRegistrationService . updateStorageUnitNotificationRegistration ( new org . finra . herd . model . api . xml . NotificationRegistrationKey ( addWhitespace ( org . finra . herd . service . NAMESPACE ) , addWhitespace ( org . finra . herd . service . NOTIFICATION_NAME ) ) , new org . finra . herd . model . api . xml . StorageUnitNotificationRegistrationUpdateRequest ( addWhitespace ( NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) ) , new org . finra . herd . model . api . xml . StorageUnitNotificationFilter ( addWhitespace ( org . finra . herd . service . BDEF_NAMESPACE_2 ) , addWhitespace ( org . finra . herd . service . BDEF_NAME_2 ) , addWhitespace ( org . finra . herd . service . FORMAT_USAGE_CODE_2 ) , addWhitespace ( org . finra . herd . service . FORMAT_FILE_TYPE_CODE_2 ) , FORMAT_VERSION_2 , addWhitespace ( org . finra . herd . service . STORAGE_NAME_2 ) , addWhitespace ( org . finra . herd . service . STORAGE_UNIT_STATUS_3 ) , NO_STORAGE_UNIT_STATUS ) , java . util . Arrays . asList ( new org . finra . herd . model . api . xml . JobAction ( addWhitespace ( org . finra . herd . service . JOB_NAMESPACE_2 ) , addWhitespace ( org . finra . herd . service . JOB_NAME_2 ) , addWhitespace ( org . finra . herd . service . CORRELATION_DATA_2 ) ) ) , ( ( ( BLANK_TEXT ) + ( org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . ENABLED ) ) + ( BLANK_TEXT ) ) ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . StorageUnitNotificationRegistration ( resultStorageUnitNotificationRegistration . getId ( ) , notificationRegistrationKey , NotificationEventTypeEntity . EventTypesStorageUnit . STRGE_UNIT_STTS_CHG . name ( ) , new org . finra . herd . model . api . xml . StorageUnitNotificationFilter ( BDEF_NAMESPACE_2 , BDEF_NAME_2 , FORMAT_USAGE_CODE_2 , FORMAT_FILE_TYPE_CODE_2 , FORMAT_VERSION_2 , STORAGE_NAME_2 , STORAGE_UNIT_STATUS_3 , NO_STORAGE_UNIT_STATUS ) , java . util . Arrays . asList ( new org . finra . herd . model . api . xml . JobAction ( JOB_NAMESPACE_2 , JOB_NAME_2 , addWhitespace ( org . finra . herd . service . CORRELATION_DATA_2 ) ) ) , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . ENABLED ) , resultStorageUnitNotificationRegistration )
testReplaceReturnedValue ( ) { final javax . sql . DataSource actual = mock ( javax . sql . DataSource . class ) ; doReturn ( mock ( java . sql . Connection . class ) ) . when ( actual ) . getConnection ( ) ; final org . piraso . proxy . RegexProxyFactory < javax . sql . DataSource > factory = new org . piraso . proxy . RegexProxyFactory < javax . sql . DataSource > ( javax . sql . DataSource . class ) ; factory . addMethodListener ( "getConnection" , new org . piraso . proxy . RegexMethodInterceptorAdapter < javax . sql . DataSource > ( ) { @ org . piraso . proxy . Override public void afterCall ( org . piraso . proxy . RegexMethodInterceptorEvent < javax . sql . DataSource > evt ) { evt . setReturnedValue ( null ) ; } } ) ; javax . sql . DataSource proxy = factory . getProxy ( actual ) ; "<AssertPlaceHolder>" ; } getProxy ( T ) { this . wrappedObject = wrappedObject ; return factory . getProxy ( wrappedObject ) ; }
org . junit . Assert . assertNull ( proxy . getConnection ( ) )
testApparentAgeIsResponseReceivedTimeLessDateHeader ( ) { 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 ( tenSecondsAgo ) ) } ; final org . apache . hc . client5 . http . cache . HttpCacheEntry entry = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . makeCacheEntry ( now , sixSecondsAgo , headers ) ; "<AssertPlaceHolder>" ; } getApparentAgeSecs ( org . apache . hc . client5 . http . cache . HttpCacheEntry ) { final java . util . Date dateValue = entry . getDate ( ) ; if ( dateValue == null ) { return org . apache . hc . client5 . http . impl . cache . CacheValidityPolicy . MAX_AGE ; } final long diff = ( entry . getResponseDate ( ) . getTime ( ) ) - ( dateValue . getTime ( ) ) ; if ( diff < 0L ) { return 0 ; } return diff / 1000 ; }
org . junit . Assert . assertEquals ( 4 , impl . getApparentAgeSecs ( entry ) )
testGet_workflow_run_id ( ) { logger . info ( "get_workflow_run_id" ) ; int workflowRunAccession = 863 ; int expResult = 23 ; int result = net . sourceforge . seqware . common . metadata . MetadataWSTest . instance . get_workflow_run_id ( workflowRunAccession ) ; "<AssertPlaceHolder>" ; } get_workflow_run_id ( int ) { return workflowRunAccession ; }
org . junit . Assert . assertEquals ( expResult , result )
flushWhenNoChangeIsMade_theResultShouldEqualToThePreviousTree ( ) { org . eclipse . jgit . lib . AnyObjectId previousTree = gfs . getStatusProvider ( ) . commit ( ) . getTree ( ) ; "<AssertPlaceHolder>" ; } flush ( ) { com . beijunyi . parallelgit . filesystem . io . RootNode root = fileStore . getRoot ( ) ; org . eclipse . jgit . lib . ObjectId ret = root . getObjectId ( true ) ; objService . flush ( ) ; return ret ; }
org . junit . Assert . assertEquals ( previousTree , gfs . flush ( ) )
testMultipleInputData ( ) { org . kie . api . runtime . rule . RuleUnitExecutor [ ] executor = new org . kie . api . runtime . rule . RuleUnitExecutor [ 3 ] ; org . kie . api . pmml . PMMLRequestData [ ] requestData = new org . kie . api . pmml . PMMLRequestData [ 3 ] ; org . kie . api . pmml . PMML4Result [ ] resultHolder = new org . kie . api . pmml . PMML4Result [ 3 ] ; org . kie . api . io . Resource res = org . kie . internal . io . ResourceFactory . newClassPathResource ( org . kie . pmml . pmml_4_2 . predictive . models . ScorecardTest . source1 ) ; kbase = new org . kie . internal . utils . KieHelper ( ) . addResource ( res , ResourceType . PMML ) . build ( ) ; executor [ 0 ] = org . kie . api . runtime . rule . RuleUnitExecutor . create ( ) . bind ( kbase ) ; executor [ 1 ] = org . kie . api . runtime . rule . RuleUnitExecutor . create ( ) . bind ( kbase ) ; executor [ 2 ] = org . kie . api . runtime . rule . RuleUnitExecutor . create ( ) . bind ( kbase ) ; org . kie . api . runtime . rule . DataSource < org . kie . api . pmml . PMMLRequestData > [ ] requests = new org . kie . api . runtime . rule . DataSource [ 3 ] ; org . kie . api . runtime . rule . DataSource < org . kie . api . pmml . PMML4Result > [ ] results = new org . kie . api . runtime . rule . DataSource [ 3 ] ; org . kie . api . runtime . rule . DataSource < org . kie . api . pmml . PMML4Data > [ ] pmmlDatas = new org . kie . api . runtime . rule . DataSource [ 3 ] ; java . lang . Double [ ] expectedScores = new java . lang . Double [ 3 ] ; expectedScores [ 0 ] = 41.345 ; expectedScores [ 1 ] = 26.345 ; expectedScores [ 2 ] = 39.345 ; java . util . LinkedHashMap < java . lang . String , java . lang . Double > [ ] expectedResults = new java . util . LinkedHashMap [ 3 ] ; expectedResults [ 0 ] = new java . util . LinkedHashMap ( ) ; expectedResults [ 0 ] . put ( "LX00" , ( - 1.0 ) ) ; expectedResults [ 0 ] . put ( "RES" , ( - 10.0 ) ) ; expectedResults [ 0 ] . put ( "123" 5 , ( - 30.0 ) ) ; expectedResults [ 1 ] = new java . util . LinkedHashMap ( ) ; expectedResults [ 1 ] . put ( "RES" , 10.0 ) ; expectedResults [ 1 ] . put ( "LX00" , ( - 1.0 ) ) ; expectedResults [ 1 ] . put ( "123" 1 , ( - 10.0 ) ) ; expectedResults [ 1 ] . put ( "123" 6 , ( - 25.0 ) ) ; expectedResults [ 2 ] = new java . util . LinkedHashMap ( ) ; expectedResults [ 2 ] . put ( "LX00" , 1.0 ) ; expectedResults [ 2 ] . put ( "123" 1 , ( - 5.0 ) ) ; expectedResults [ 2 ] . put ( "RES" , ( - 5.0 ) ) ; expectedResults [ 2 ] . put ( "CX1" , ( - 30.0 ) ) ; requestData [ 0 ] = createRequest ( "123" , "Sample<sp>Score" , 33.0 , "123" 2 , "123" 9 , true ) ; requestData [ 1 ] = createRequest ( "124" , "Sample<sp>Score" , 50.0 , "TEACHER" , "AP" , true ) ; requestData [ 2 ] = createRequest ( "123" 0 , "Sample<sp>Score" , 10.0 , "123" 7 , "123" 3 , false ) ; for ( int x = 0 ; x < 3 ; x ++ ) { requests [ x ] = executor [ x ] . newDataSource ( "123" 8 ) ; results [ x ] = executor [ x ] . newDataSource ( "results" ) ; pmmlDatas [ x ] = executor [ x ] . newDataSource ( "123" 4 ) ; resultHolder [ x ] = new org . kie . api . pmml . PMML4Result ( requestData [ x ] . getCorrelationId ( ) ) ; } java . util . List < java . lang . String > possiblePackages = calculatePossiblePackageNames ( "Sample<sp>Score" , "org.drools.scorecards.example" ) ; java . lang . Class < ? extends org . kie . api . runtime . rule . RuleUnit > unitClass = getStartingRuleUnit ( "CX1" 0 , ( ( org . drools . core . impl . InternalKnowledgeBase ) ( kbase ) ) , possiblePackages ) ; "<AssertPlaceHolder>" ; for ( int x = 0 ; x < 3 ; x ++ ) { executor [ x ] . run ( unitClass ) ; } for ( int y = 0 ; y < 3 ; y ++ ) { requests [ y ] . insert ( requestData [ y ] ) ; results [ y ] . insert ( resultHolder [ y ] ) ; } for ( int z = 0 ; z < 3 ; z ++ ) { executor [ z ] . run ( unitClass ) ; } for ( int p = 0 ; p < 3 ; p ++ ) { checkResult ( resultHolder [ p ] , expectedScores [ p ] , expectedResults [ p ] ) ; } } getStartingRuleUnit ( java . lang . String , org
org . junit . Assert . assertNotNull ( unitClass )
firstTest ( ) { com . microsoft . azure . management . compute . v2017_12_01 . ComputeTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . compute . v2017_12_01 . ComputeTest . resourceManager . resourceGroups ( ) . define ( com . microsoft . azure . management . compute . v2017_12_01 . ComputeTest . rgName ) . withRegion ( Region . US_WEST . toString ( ) ) . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { return this . create ( null , null , null , null ) ; }
org . junit . Assert . assertNotNull ( group )
configurePermissionsDenied ( ) { org . alfresco . service . cmr . security . AccessStatus accessStatus = org . alfresco . service . cmr . security . AccessStatus . DENIED ; org . alfresco . service . cmr . repository . NodeRef nodeRef = new org . alfresco . service . cmr . repository . NodeRef ( "node://ref/" ) ; java . lang . String perm = org . alfresco . module . org_alfresco_module_rm . test . util . AlfMock . generateText ( ) ; java . util . List < java . lang . String > configuredReadPermissions = asList ( "ReadProperties" , "ReadChildren" ) ; java . util . List < java . lang . String > configuredFilePermissions = asList ( "WriteProperties" , "AddChildren" ) ; when ( mockNodeService . hasAspect ( nodeRef , RecordsManagementModel . ASPECT_FILE_PLAN_COMPONENT ) ) . thenReturn ( true ) ; when ( mockPermissionService . hasPermission ( nodeRef , RMPermissionModel . READ_RECORDS ) ) . thenReturn ( AccessStatus . ALLOWED ) ; org . alfresco . service . cmr . security . AccessStatus result = recordsManagementPermissionPostProcessor . process ( accessStatus , nodeRef , perm , configuredReadPermissions , configuredFilePermissions ) ; "<AssertPlaceHolder>" ; } process ( org . alfresco . service . cmr . security . AccessStatus , org . alfresco . service . cmr . repository . NodeRef , java . lang . String , java . util . List , java . util . List ) { org . alfresco . service . cmr . security . AccessStatus result = accessStatus ; if ( ( AccessStatus . DENIED . equals ( accessStatus ) ) && ( nodeService . hasAspect ( nodeRef , RecordsManagementModel . ASPECT_FILE_PLAN_COMPONENT ) ) ) { if ( ( PermissionService . READ . equals ( perm ) ) || ( isPermissionContained ( perm , configuredReadPermissions ) ) ) { result = permissionService . hasPermission ( nodeRef , RMPermissionModel . READ_RECORDS ) ; } else if ( ( PermissionService . WRITE . equals ( perm ) ) || ( isPermissionContained ( perm , configuredFilePermissions ) ) ) { result = permissionService . hasPermission ( nodeRef , RMPermissionModel . FILE_RECORDS ) ; } } return result ; }
org . junit . Assert . assertEquals ( AccessStatus . DENIED , result )
testLocalTransportFetchWithoutLocalRepository ( ) { org . eclipse . jgit . transport . URIish uri = new org . eclipse . jgit . transport . URIish ( ( "file://" + ( db . getWorkTree ( ) . getAbsolutePath ( ) ) ) ) ; try ( org . eclipse . jgit . transport . Transport transport = org . eclipse . jgit . transport . Transport . open ( uri ) ) { try ( org . eclipse . jgit . transport . FetchConnection fetchConnection = transport . openFetch ( ) ) { org . eclipse . jgit . lib . Ref head = fetchConnection . getRef ( Constants . HEAD ) ; "<AssertPlaceHolder>" ; } } } getRef ( int ) { return refs [ nth ] ; }
org . junit . Assert . assertNotNull ( head )
q_field_comparison ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field4','op':'>','rfield':'field3'}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertTrue ( ctx . getResult ( ) )
testAlias ( ) { new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . dao . mock . BeanWrapperVisitorTest . TestBean . class ) . alias ( "subBean" , "foo" ) . eq ( "foo.one" , 1.0 ) . toCriteria ( ) . visit ( m_visitor ) ; "<AssertPlaceHolder>" ; } getMatches ( ) { return ( m_matches ) == null ? "(.*)" : m_matches ; }
org . junit . Assert . assertEquals ( 1 , m_visitor . getMatches ( ) . size ( ) )
testPassesOnOrigin407WithoutAProxyAuthenticateHeader ( ) { originResponse = new org . apache . hc . core5 . http . message . BasicClassicHttpResponse ( 407 , "Proxy<sp>Authentication<sp>Required" ) ; org . easymock . EasyMock . expect ( mockExecChain . proceed ( org . easymock . EasyMock . isA ( org . apache . hc . core5 . http . ClassicHttpRequest . class ) , org . easymock . EasyMock . isA ( ExecChain . Scope . class ) ) ) . andReturn ( originResponse ) ; replayMocks ( ) ; final org . apache . hc . core5 . http . HttpResponse result = execute ( request ) ; verifyMocks ( ) ; "<AssertPlaceHolder>" ; } verifyMocks ( ) { org . easymock . EasyMock . verify ( mockExecChain ) ; org . easymock . EasyMock . verify ( mockCache ) ; }
org . junit . Assert . assertSame ( originResponse , result )
testMutableInterfaceDeclaration ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "package<sp>foo" ) ; _builder . newLine ( ) ; _builder . newLine ( ) ; _builder . append ( "interface<sp>MyInterface<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . newLine ( ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; final org . eclipse . xtext . xbase . lib . Procedures . Procedure1 < org . eclipse . xtend . core . macro . declaration . CompilationUnitImpl > _function = ( org . eclipse . xtend . core . macro . declaration . CompilationUnitImpl it ) -> { final org . eclipse . xtend . lib . macro . declaration . MutableInterfaceDeclaration genInterface = it . getTypeLookup ( ) . findInterface ( "foo.MyInterface" ) ; final Procedure1 < org . eclipse . xtend . lib . macro . declaration . MutableMethodDeclaration > _function_1 = ( org . eclipse . xtend . lib . macro . declaration . MutableMethodDeclaration it_1 ) -> { } ; final org . eclipse . xtend . lib . macro . declaration . MutableMethodDeclaration m = genInterface . addMethod ( "newMethod" , _function_1 ) ; "<AssertPlaceHolder>" ; } ; this . asCompilationUnit ( this . validFile ( _builder ) , _function ) ; } isAbstract ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertTrue ( m . isAbstract ( ) )
testNotEqualsSize ( ) { org . ujmp . core . Matrix matrix1 = Matrix . Factory . zeros ( org . ujmp . core . calculation . TestGinv . M2ROWS , org . ujmp . core . calculation . TestGinv . M1COLS ) ; setValues ( matrix1 ) ; org . ujmp . core . Matrix matrix2 = Matrix . Factory . zeros ( org . ujmp . core . calculation . TestGinv . M1ROWS , org . ujmp . core . calculation . TestGinv . M1COLS ) ; setValues ( matrix2 ) ; boolean result = matrix1 . equals ( matrix2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } else if ( o instanceof org . ujmp . core . Coordinates ) { return equals ( ( ( org . ujmp . core . Coordinates ) ( o ) ) ) ; } else { return false ; } }
org . junit . Assert . assertFalse ( result )
testQueryNotExistArpa ( ) { java . lang . String domainName = "10.in-addr.arpa" ; org . restfulwhois . rdap . common . model . Domain domain = domainQueryDao . query ( org . restfulwhois . rdap . core . domain . queryparam . DomainQueryParam . generateQueryParam ( domainName , domainName ) ) ; "<AssertPlaceHolder>" ; } generateQueryParam ( java . lang . String , java . lang . String ) { return new org . restfulwhois . rdap . core . domain . queryparam . DomainQueryParam ( domainName , punyDomainName ) ; }
org . junit . Assert . assertNull ( domain )
discardOutline ( ) { org . sejda . model . parameter . SimpleSplitParameters parameters = defaultCommandLine ( ) . withFlag ( "--discardOutline" ) . invokeSejdaConsole ( ) ; "<AssertPlaceHolder>" ; } discardOutline ( ) { return discardOutline ; }
org . junit . Assert . assertTrue ( parameters . discardOutline ( ) )
testNPlusOne ( ) { doInJPA ( ( entityManager ) -> { com . vladmihalcea . book . hpjp . hibernate . forum . Post post = new com . vladmihalcea . book . hpjp . hibernate . forum . Post ( ) ; post . setId ( 1L ) ; post . setTitle ( "High-Performance<sp>Java<sp>Persistence,<sp>1st<sp>Part" ) ; com . vladmihalcea . book . hpjp . hibernate . forum . PostDetails details = new com . vladmihalcea . book . hpjp . hibernate . forum . PostDetails ( ) ; details . setCreatedBy ( "Vlad<sp>Mihalcea" ) ; post . addDetails ( details ) ; entityManager . persist ( post ) ; } ) ; com . vladmihalcea . book . hpjp . hibernate . forum . Post post = doInJPA ( ( entityManager ) -> { return entityManager . createQuery ( ( "select<sp>p<sp>" + ( "from<sp>Post<sp>p<sp>" + "where<sp>p.title<sp>like<sp>'High-Performance<sp>Java<sp>Persistence%'" ) ) , . class ) . getSingleResult ( ) ; } ) ; try { "<AssertPlaceHolder>" ; junit . framework . Assert . fail ( "Should<sp>throw<sp>LazyInitializationException" ) ; } catch ( java . lang . Exception expected ) { com . vladmihalcea . book . hpjp . hibernate . association . LOGGER . info ( "The<sp>@OneToOne<sp>association<sp>was<sp>fetched<sp>lazily" ) ; } } getDetails ( ) { return details ; }
org . junit . Assert . assertNotNull ( post . getDetails ( ) )
pcjMetadata_equals ( ) { org . apache . rya . indexing . pcj . storage . PcjMetadata meta1 = new org . apache . rya . indexing . pcj . storage . PcjMetadata ( "A<sp>SPARQL<sp>string." , 5 , com . google . common . collect . Sets . newHashSet ( new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "a" , "b" , "c" ) , new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "d" , "e" , "f" ) ) ) ; org . apache . rya . indexing . pcj . storage . PcjMetadata meta2 = new org . apache . rya . indexing . pcj . storage . PcjMetadata ( "A<sp>SPARQL<sp>string." , 5 , com . google . common . collect . Sets . newHashSet ( new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "a" , "b" , "c" ) , new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "d" , "e" , "f" ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( meta1 , meta2 )
hasWinner ( ) { int [ ] [ ] board = new int [ ] [ ] { new int [ ] { 1 , 1 , 1 } , new int [ ] { 1 , 1 , 0 } , new int [ ] { 1 , 2 , 1 } } ; boolean result ; ru . szhernovoy . io . TicTacToeReccurcy test = new ru . szhernovoy . io . TicTacToeReccurcy ( board ) ; result = test . hasWinner ( ) ; "<AssertPlaceHolder>" ; } hasWinner ( ) { int [ ] agrregateLineAndColumn = new int [ ] { 0 , 0 , 0 , 0 } ; int [ ] aggregateDiagonal = new int [ ] { 0 , 0 , 0 , 0 } ; int valueMinus = ( this . values . length ) - 1 ; boolean winner = false ; for ( int valueX = 0 ; valueX < ( this . values . length ) ; valueX ++ , valueMinus -- ) { agrregateLineAndColumn [ 0 ] = agrregateLineAndColumn [ 1 ] = agrregateLineAndColumn [ 2 ] = agrregateLineAndColumn [ 3 ] = 0 ; accumalateValue ( this . values [ valueX ] [ valueX ] , aggregateDiagonal , 0 ) ; accumalateValue ( this . values [ valueMinus ] [ valueMinus ] , aggregateDiagonal , 1 ) ; for ( int valueY = 0 ; valueY < ( this . values . length ) ; valueY ++ ) { accumalateValue ( this . values [ valueX ] [ valueY ] , agrregateLineAndColumn , 1 ) ; accumalateValue ( this . values [ valueY ] [ valueX ] , agrregateLineAndColumn , 2 ) ; } winner = checkOnWin ( agrregateLineAndColumn [ 0 ] , agrregateLineAndColumn [ 2 ] , agrregateLineAndColumn [ 1 ] , agrregateLineAndColumn [ 3 ] ) ; if ( ! winner ) { winner = checkOnWin ( aggregateDiagonal [ 0 ] , aggregateDiagonal [ 2 ] , aggregateDiagonal [ 1 ] , aggregateDiagonal [ 3 ] ) ; } if ( winner ) { break ; } } return winner ; }
org . junit . Assert . assertThat ( true , org . hamcrest . core . Is . is ( result ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . site . navigation . model . SiteNavigationMenu missingSiteNavigationMenu = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingSiteNavigationMenu )
testDeleteAlternativeAttribute ( ) { deleteAllIn ( provider ) ; ddf . catalog . source . solr . MockMetacard metacard = new ddf . catalog . source . solr . MockMetacard ( ddf . catalog . source . solr . Library . getFlagstaffRecord ( ) ) ; ddf . catalog . operation . CreateResponse createResponse = create ( metacard ) ; ddf . catalog . operation . DeleteResponse deleteResponse = provider . delete ( new ddf . catalog . operation . DeleteRequest ( ) { @ ddf . catalog . source . solr . Override public boolean hasProperties ( ) { return false ; } @ ddf . catalog . source . solr . Override public java . io . Serializable getPropertyValue ( java . lang . String name ) { return null ; } @ ddf . catalog . source . solr . Override public java . util . Set < java . lang . String > getPropertyNames ( ) { return null ; } @ ddf . catalog . source . solr . Override public java . util . Map < java . lang . String , java . io . Serializable > getProperties ( ) { return null ; } @ ddf . catalog . source . solr . Override public boolean containsPropertyName ( java . lang . String name ) { return false ; } @ ddf . catalog . source . solr . Override public java . util . List < ? extends java . io . Serializable > getAttributeValues ( ) { return java . util . Arrays . asList ( MockMetacard . DEFAULT_TITLE ) ; } @ ddf . catalog . source . solr . Override public java . lang . String getAttributeName ( ) { return ddf . catalog . data . Metacard . TITLE ; } } ) ; ddf . catalog . data . Metacard deletedMetacard = deleteResponse . getDeletedMetacards ( ) . get ( 0 ) ; verifyDeletedRecord ( metacard , createResponse , deleteResponse , deletedMetacard ) ; org . opengis . filter . Filter filter = filterBuilder . attribute ( Metacard . TITLE ) . like ( ) . text ( MockMetacard . DEFAULT_TITLE ) ; ddf . catalog . operation . impl . QueryImpl query = new ddf . catalog . operation . impl . QueryImpl ( filter ) ; ddf . catalog . operation . SourceResponse sourceResponse = provider . query ( new ddf . catalog . operation . impl . QueryRequestImpl ( query ) ) ; java . util . List < ddf . catalog . data . Result > results = sourceResponse . getResults ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return serviceMap . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , results . size ( ) )
getUrlQueryWithoutJobTypeSucceeds ( ) { final java . lang . String iotHubName = "b.c.d" ; final java . lang . String hostName = "HOSTNAME." + iotHubName ; final java . lang . String sharedAccessKeyName = "ACCESSKEYNAME" ; final java . lang . String policyName = "SharedAccessKey" ; final java . lang . String sharedAccessKey = "1234567890abcdefghijklmnopqrstvwxyz=" ; final java . lang . String connectionString = ( ( ( ( ( ( "HostName=" + hostName ) + ";SharedAccessKeyName=" ) + sharedAccessKeyName ) + ";" ) + policyName ) + "=" ) + sharedAccessKey ; final com . microsoft . azure . sdk . iot . service . IotHubConnectionString iotHubConnectionString = com . microsoft . azure . sdk . iot . service . IotHubConnectionStringBuilder . createConnectionString ( connectionString ) ; final java . lang . String expected = "https://HOSTNAME.b.c.d/jobs/v2/query?jobStatus=jobStatus&" + ( tests . unit . com . microsoft . azure . sdk . iot . service . IotHubConnectionStringTest . URL_API_VERSION ) ; final java . lang . String jobType = null ; final java . lang . String jobStatus = "HostName=" 0 ; java . lang . String actual = iotHubConnectionString . getUrlQuery ( jobType , jobStatus ) . toString ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( other instanceof com . microsoft . azure . sdk . iot . service . auth . X509Thumbprint ) { com . microsoft . azure . sdk . iot . service . auth . X509Thumbprint otherThumbprint = ( ( com . microsoft . azure . sdk . iot . service . auth . X509Thumbprint ) ( other ) ) ; return ( com . microsoft . azure . sdk . iot . service . Tools . areEqual ( this . getPrimaryThumbprint ( ) , otherThumbprint . getPrimaryThumbprint ( ) ) ) && ( com . microsoft . azure . sdk . iot . service . Tools . areEqual ( this . getSecondaryThumbprint ( ) , otherThumbprint . getSecondaryThumbprint ( ) ) ) ; } return false ; }
org . junit . Assert . assertTrue ( actual . equals ( expected ) )
testListNotes ( ) { java . util . List < org . eclipse . jgit . notes . Note > notes = git . notesList ( ) . call ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return cnt ; }
org . junit . Assert . assertEquals ( 1 , notes . size ( ) )
testRegexpSubstrFunction2 ( ) { java . lang . String tTableName = generateUniqueName ( ) ; java . lang . String url = getUrl ( ) ; java . util . Properties props = org . apache . phoenix . util . PropertiesUtil . deepCopy ( org . apache . phoenix . end2end . TEST_PROPERTIES ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( url , props ) ; java . lang . String ddl = ( "create<sp>table<sp>" + tTableName ) + "<sp>(k<sp>INTEGER<sp>NOT<sp>NULL<sp>PRIMARY<sp>KEY,<sp>name<sp>VARCHAR)" ; conn . createStatement ( ) . execute ( ddl ) ; conn . close ( ) ; java . lang . String dml = ( "hrjcu" 1 + tTableName ) + "<sp>values(?,?)" ; conn = java . sql . DriverManager . getConnection ( url , props ) ; java . sql . PreparedStatement stmt = conn . prepareStatement ( dml ) ; java . lang . String [ ] values = new java . lang . String [ ] { "satax" , "jruls" , "hrjcu" , "hrjcu" 0 , "hrjcu" 2 } ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { stmt . setInt ( 1 , ( i + 1 ) ) ; stmt . setString ( 2 , values [ i ] ) ; stmt . execute ( ) ; } conn . commit ( ) ; conn . close ( ) ; java . lang . String query = ( "select<sp>regexp_substr(name,'[^s]+',1)<sp>from<sp>" + tTableName ) + "<sp>limit<sp>5" ; conn = java . sql . DriverManager . getConnection ( url , props ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( query ) ; int count = 0 ; java . lang . String [ ] results = new java . lang . String [ ] { "atax" , "jrul" , "hrjcu" , "hrjcu" 0 , "hrjcu" 2 } ; while ( rs . next ( ) ) { "<AssertPlaceHolder>" ; count ++ ; } } getString ( java . lang . String ) { return getString ( findColumn ( columnLabel ) ) ; }
org . junit . Assert . assertEquals ( results [ count ] , rs . getString ( 1 ) )
applicationContextBinder ( ) { loadWithDefaults ( new java . lang . Class [ ] { org . togglz . spring . boot . autoconfigure . TogglzAutoConfigurationTest . FeatureProviderConfig . class } ) ; "<AssertPlaceHolder>" ; } get ( ) { java . lang . ClassLoader classLoader = org . togglz . spring . util . ContextClassLoaderApplicationContextHolder . getContextClassLoader ( ) ; while ( classLoader != null ) { org . springframework . context . ApplicationContext applicationContext = org . togglz . spring . util . ContextClassLoaderApplicationContextHolder . contextMap . get ( classLoader ) ; if ( applicationContext != null ) { return applicationContext ; } classLoader = classLoader . getParent ( ) ; } return null ; }
org . junit . Assert . assertSame ( this . context , org . togglz . spring . util . ContextClassLoaderApplicationContextHolder . get ( ) )
testUserDnTemplate ( ) { java . lang . String template = "uid={0},ou=users,dc=mycompany,dc=com" ; realm . setUserDnTemplate ( template ) ; "<AssertPlaceHolder>" ; } getUserDnTemplate ( ) { return getUserDn ( org . apache . shiro . realm . ldap . DefaultLdapRealm . USERDN_SUBSTITUTION_TOKEN ) ; }
org . junit . Assert . assertEquals ( template , realm . getUserDnTemplate ( ) )
changeBaseTest ( ) { int size = 4 ; org . openscience . cdk . group . PermutationGroup group = new org . openscience . cdk . group . PermutationGroup ( size ) ; group . enter ( new org . openscience . cdk . group . Permutation ( 1 , 0 , 3 , 2 ) ) ; group . changeBase ( new org . openscience . cdk . group . Permutation ( size ) ) ; "<AssertPlaceHolder>" ; } order ( ) { java . util . Collections . sort ( cells , new java . util . Comparator < java . util . SortedSet < java . lang . Integer > > ( ) { @ org . openscience . cdk . group . Override public int compare ( java . util . SortedSet < java . lang . Integer > cellA , java . util . SortedSet < java . lang . Integer > cellB ) { return cellA . first ( ) . compareTo ( cellB . first ( ) ) ; } } ) ; }
org . junit . Assert . assertEquals ( 2 , group . order ( ) )
shouldCreateNewHashMapCacheIfOneDoesNotExist ( ) { uk . gov . gchq . gaffer . cache . ICache cache = service . getCache ( uk . gov . gchq . gaffer . cache . impl . HashMapCacheServiceTest . CACHE_NAME ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , cache . size ( ) )
testIsAOptimization ( ) { java . lang . String source = "<sp>@Traitable\n" 7 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "then\n" 1 + "then\n" 8 ) + "then\n" 9 ) + "<sp>@Traitable\n" 6 ) + "<sp>@Traitable\n" 1 ) + "<sp>@Traitable\n" 6 ) + "" ) + "<sp>@Traitable\n" 9 ) + "<sp>@Traitable\n" 5 ) + "<sp>@Traitable\n" 8 ) + "<sp>@Traitable\n" 2 ) + "then\n" 6 ) + "<sp>@Traitable\n" 3 ) + "" ) + "declare<sp>Kore\n" ) + "<sp>@Traitable\n" ) + "end\n" ) + "" ) + "rule<sp>Init<sp>when\n" ) + "then\n" ) + "<sp>@Traitable\n" 4 ) + "then\n" 2 ) + "end\n" ) + "" ) + "rule<sp>Check_1<sp>when\n" ) + "then\n" 0 ) + "then<sp>\n" ) + "<sp>list.add(<sp>\"<sp>B+D<sp>\"then\n" 3 ) + "end\n" ) + "" ) + "<sp>@Traitable\n" 0 ) + "then\n" 4 ) + "then<sp>\n" ) + "<sp>list.add(<sp>\"<sp>A<sp>\"then\n" 3 ) + "end\n" ) + "then\n" 7 ) + "<sp>$x<sp>:<sp>Kore(<sp>this<sp>not<sp>isA<sp>[<sp>F<sp>]<sp>)<sp>\n" ) + "then<sp>\n" ) + "<sp>list.add(<sp>\"<sp>F<sp>\"then\n" 3 ) + "end\n" ) + "" ) ; org . kie . api . runtime . KieSession ks = getSessionFromString ( source ) ; org . drools . core . factmodel . traits . TraitFactory . setMode ( mode , ks . getKieBase ( ) ) ; java . util . List list = new java . util . ArrayList ( ) ; ks . setGlobal ( "then\n" 5 , list ) ; ks . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return rulesFired . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , list . size ( ) )
testMARCspecParserB_24a ( ) { de . gwdg . metadataqa . marc . utils . marcspec . MARCspecParser parser = new de . gwdg . metadataqa . marc . utils . marcspec . MARCspecParser ( ) ; de . gwdg . metadataqa . marc . utils . marcspec . MARCspec marcSpec = null ; try { marcSpec = parser . parse ( "24a$a" ) ; } catch ( de . gwdg . metadataqa . marc . utils . marcspec . exception . InvalidMARCspecException e ) { } "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { de . gwdg . metadataqa . marc . definition . general . Linkage linkage = create ( input ) ; if ( linkage == null ) throw new de . gwdg . metadataqa . marc . definition . general . parser . ParserException ( java . lang . String . format ( "'%s'<sp>is<sp>not<sp>parsable" , input ) ) ; return linkage . getMap ( ) ; }
org . junit . Assert . assertNull ( marcSpec )
testDescendantNodeQueries ( ) { org . jahia . services . content . JCRSessionWrapper session = org . jahia . services . content . JCRSessionFactory . getInstance ( ) . getCurrentUserSession ( Constants . EDIT_WORKSPACE , org . jahia . utils . LanguageCodeConverters . languageCodeToLocale ( org . jahia . test . services . query . QueryResultTest . DEFAULT_LANGUAGE ) ) ; org . jahia . services . query . QueryResultWrapper res ; res = doQuery ( session , ( ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 0 + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/news])<sp>ORDER<sp>BY<sp>news.[jcr:title]" ) , Query . JCR_SQL2 ) ; checkResultSize ( res , 23 ) ; res = doQuery ( session , ( ( ( ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 6 + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 9 ) + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" ) , Query . JCR_SQL2 ) ; checkResultSize ( res , 50 ) ; res = doQuery ( session , ( ( "SELECT<sp>*<sp>FROM<sp>[jmix:editorialContent]<sp>as<sp>content<sp>WHERE<sp>NOT<sp>ISDESCENDANTNODE(content,<sp>[" + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/news])<sp>ORDER<sp>BY<sp>content.[jcr:title]" ) , Query . JCR_SQL2 ) ; int size = checkHierarchy ( res , org . jahia . test . services . query . QueryResultTest . NOT_DESCENDANT_CHECK , ( ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) + "/contents/news" ) ) ; res = doQuery ( session , ( ( ( ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 2 + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 8 ) + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/news]))<sp>ORDER<sp>BY<sp>content.[jcr:title]" ) , Query . JCR_SQL2 ) ; int size2 = checkHierarchy ( res , org . jahia . test . services . query . QueryResultTest . NOT_DESCENDANT_CHECK , ( ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) + "/contents/events" ) , ( ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) + "/contents/news" ) ) ; "<AssertPlaceHolder>" ; res = doQuery ( session , ( ( ( ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 6 + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 1 ) + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/news])<sp>ORDER<sp>BY<sp>content.[jcr:title]" ) , Query . JCR_SQL2 ) ; checkResultSize ( res , 27 ) ; res = doQuery ( session , ( ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 6 + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 3 ) , Query . JCR_SQL2 ) ; checkResultSize ( res , 11 ) ; res = doQuery ( session , ( ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 6 + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/news])<sp>AND<sp>contains(content.*,<sp>'cucumber')" ) , Query . JCR_SQL2 ) ; checkResultSize ( res , 13 ) ; res = doQuery ( session , ( ( ( ( ( ( "SELECT<sp>*<sp>FROM<sp>[jmix:editorialContent]<sp>as<sp>content<sp>WHERE<sp>(ISCHILDNODE(content,<sp>[" + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/news])<sp>AND<sp>content.[jcr:title]<sp>LIKE<sp>'news_1%')<sp>OR<sp>(ISDESCENDANTNODE(content,<sp>[" ) + ( org . jahia . test . services . query . QueryResultTest . SITECONTENT_ROOT_NODE ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 5 ) + ( org . jahia . test . services . query . QueryResultTest . GENEVA ) ) + "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 7 ) , Query . JCR_SQL2 ) ; checkResultSize ( res , ( 7 + 12 ) ) ; } doQuery ( java . lang . String , int , boolean ) { if ( org . jahia . services . query . NativeSortIT . logger . isDebugEnabled ( ) ) { org . jahia . services . query . NativeSortIT . logger . debug ( "Query:<sp>{}" , statement ) ; } org . jahia . services . query . NativeSortIT . setNativeSort ( true ) ; long timerNative = java . lang . System . currentTimeMillis ( ) ; java . util . List < org . jahia . services . content . JCRNodeWrapper > nodesNative = null ; try { javax . jcr . query . Query query = session . getWorkspace ( ) . getQueryManager ( ) . createQuery ( statement , Query . JCR_SQL2 ) ; org . jahia . services . query . QueryResultWrapper res = ( ( org . jahia . services . query . QueryResultWrapper ) ( query . execute ( ) ) ) ; nodesNative = checkResultSize ( res , expectedResultCount ) ; } finally { timerNative = ( java . lang . System . currentTimeMillis ( ) ) - timerNative ; if ( org . jahia . services . query . NativeSortIT . logger . isDebugEnabled ( ) ) { org . jahia . services . query . NativeSortIT . logger . debug ( "Query<sp>with<sp>native<sp>sort<sp>took<sp>{}<sp>ms" , timerNative ) ; } } org . jahia . services . query . NativeSortIT . setNativeSort ( false ) ; long timer = java . lang . System . currentTimeMillis ( ) ; java . util . List < org . jahia . services . content . JCRNodeWrapper > nodes = null ; try { javax . jcr . query . Query query = session . getWorkspace ( ) . getQueryManager ( ) . createQuery ( statement , Query . JCR_SQL2 ) ; org . jahia . services . query . QueryResultWrapper res = ( ( org . jahia . services . query . QueryResultWrapper ) ( query . execute ( ) ) ) ; nodes = checkResultSize ( res , expectedResultCount ) ; } finally { timer = ( java . lang . System . currentTimeMillis ( ) ) - timer ; if ( org . jahia
org . junit . Assert . assertEquals ( "/contents/events])<sp>ORDER<sp>BY<sp>content.[jcr:title]" 4 , 27 , ( size - size2 ) )
testPriorityOnModification ( ) { processInstance = runtimeService . startProcessInstanceByKey ( "serviceTaskProcess" ) ; org . camunda . bpm . engine . runtime . TransitionInstance transitionInstance = runtimeService . getActivityInstance ( processInstance . getId ( ) ) . getTransitionInstances ( "serviceTask" ) [ 0 ] ; runtimeService . createProcessInstanceModification ( processInstance . getId ( ) ) . startBeforeActivity ( "serviceTask" ) . cancelTransitionInstance ( transitionInstance . getId ( ) ) . execute ( ) ; org . camunda . bpm . engine . runtime . Job job = managementService . createJobQuery ( ) . singleResult ( ) ; "<AssertPlaceHolder>" ; } getPriority ( ) { return org . camunda . bpm . integrationtest . jobexecutor . beans . PriorityBean . PRIORITY ; }
org . junit . Assert . assertEquals ( PriorityBean . PRIORITY , job . getPriority ( ) )
testReadObjectFromString ( ) { java . lang . String value = org . apache . activemq . artemis . utils . RandomUtil . randomString ( ) ; org . apache . activemq . artemis . jms . client . ActiveMQStreamMessage message = new org . apache . activemq . artemis . jms . client . ActiveMQStreamMessage ( ) ; message . writeString ( value ) ; message . reset ( ) ; "<AssertPlaceHolder>" ; } readObject ( ) { if ( bodyWriteOnly ) { throw new javax . jms . MessageNotReadableException ( "The<sp>message<sp>body<sp>is<sp>writeonly" ) ; } try { java . lang . Object value = content . get ( position ) ; ( position ) ++ ; offset = 0 ; return value ; } catch ( java . lang . IndexOutOfBoundsException e ) { throw new javax . jms . MessageEOFException ( "" ) ; } }
org . junit . Assert . assertEquals ( value , message . readObject ( ) )
testValidateStateExpiration ( ) { final org . apache . nifi . web . security . oidc . OidcService service = getServiceWithOidcSupportAndCustomExpiration ( 1 , TimeUnit . SECONDS ) ; final com . nimbusds . oauth2 . sdk . id . State state = service . createState ( org . apache . nifi . web . security . oidc . OidcServiceTest . TEST_REQUEST_IDENTIFIER ) ; java . lang . Thread . sleep ( ( 3 * 1000 ) ) ; "<AssertPlaceHolder>" ; } isStateValid ( java . lang . String , com . nimbusds . oauth2 . sdk . id . State ) { if ( ! ( isOidcEnabled ( ) ) ) { throw new java . lang . IllegalStateException ( org . apache . nifi . web . security . oidc . StandardOidcIdentityProvider . OPEN_ID_CONNECT_SUPPORT_IS_NOT_CONFIGURED ) ; } if ( proposedState == null ) { throw new java . lang . IllegalArgumentException ( "Proposed<sp>state<sp>must<sp>be<sp>specified." ) ; } final org . apache . nifi . web . security . util . CacheKey oidcRequestIdentifierKey = new org . apache . nifi . web . security . util . CacheKey ( oidcRequestIdentifier ) ; synchronized ( stateLookupForPendingRequests ) { final com . nimbusds . oauth2 . sdk . id . State state = stateLookupForPendingRequests . getIfPresent ( oidcRequestIdentifierKey ) ; if ( state != null ) { stateLookupForPendingRequests . invalidate ( oidcRequestIdentifierKey ) ; } return ( state != null ) && ( timeConstantEqualityCheck ( state . getValue ( ) , proposedState . getValue ( ) ) ) ; } }
org . junit . Assert . assertFalse ( service . isStateValid ( org . apache . nifi . web . security . oidc . OidcServiceTest . TEST_REQUEST_IDENTIFIER , state ) )
isActiveDecisionTableEditableNotReadOnly ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter dtPresenter = makeDecisionTable ( ) ; final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTablePresenter . Access access = new org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTablePresenter . Access ( ) ; access . setReadOnly ( false ) ; when ( presenter . getActiveDecisionTable ( ) ) . thenReturn ( java . util . Optional . of ( dtPresenter ) ) ; when ( dtPresenter . getAccess ( ) ) . thenReturn ( access ) ; "<AssertPlaceHolder>" ; } isActiveDecisionTableEditable ( ) { final java . util . Optional < org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter > dtPresenter = getActiveDecisionTable ( ) ; if ( dtPresenter . isPresent ( ) ) { return dtPresenter . get ( ) . getAccess ( ) . isEditable ( ) ; } return false ; }
org . junit . Assert . assertTrue ( presenter . isActiveDecisionTableEditable ( ) )
testTruncIntegerValueNegative3 ( ) { java . lang . String sqlText = "values<sp>truncate(123321,<sp>-3)" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "--------\n" + "123000<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testClassIdFromNullMetadataClassName ( ) { "<AssertPlaceHolder>" ; } create ( java . lang . Class ) { if ( metadataClass == null ) { return null ; } return org . springframework . roo . metadata . MetadataIdentificationUtils . create ( metadataClass . getName ( ) ) ; }
org . junit . Assert . assertNull ( org . springframework . roo . metadata . MetadataIdentificationUtils . create ( ( ( java . lang . String ) ( null ) ) ) )
testOLDDateRangeQuery1 ( ) { lemongrenade . core . database . mongo . List < lemongrenade . core . models . LGJob > jobs1 = lemongrenade . core . database . mongo . LGJobDAOImplTest . dao . getAllByDays ( 29 , 30 ) ; "<AssertPlaceHolder>" ; } lookInList ( lemongrenade . core . database . mongo . List , java . lang . String ) { for ( lemongrenade . core . models . LGJob job : jobs ) { if ( job . getJobId ( ) . equals ( jobId ) ) { return true ; } } return false ; }
org . junit . Assert . assertFalse ( lookInList ( jobs1 , j . getJobId ( ) ) )
testGetAsStringSpaceAndThreeByteSpaceMixtureLeading ( ) { java . lang . String in = "<sp>" + ( ( ( ( " " + "<sp>" ) + "  " ) + "<sp>" ) + " " ) ; java . lang . String out = converter . getAsString ( context , component , in ) ; "<AssertPlaceHolder>" ; } getAsString ( javax . faces . context . FacesContext , javax . faces . component . UIComponent , java . lang . Object ) { java . lang . String retVal ; if ( ! ( object instanceof org . oscm . internal . vo . VOPaymentInfo ) ) { retVal = "" ; } else { retVal = java . lang . String . valueOf ( ( ( org . oscm . internal . vo . VOPaymentInfo ) ( object ) ) . getKey ( ) ) ; } return retVal ; }
org . junit . Assert . assertEquals ( null , out )
withinTest ( ) { geom = org . geotoolkit . lucene . LuceneTest . GF . createLineString ( new org . geotoolkit . lucene . Coordinate [ ] { new org . geotoolkit . lucene . Coordinate ( ( - 40 ) , 30 ) , new org . geotoolkit . lucene . Coordinate ( 40 , 20 ) } ) ; org . geotoolkit . geometry . jts . JTS . setCRS ( geom , org . apache . sis . referencing . CommonCRS . defaultGeographic ( ) ) ; filter = org . geotoolkit . lucene . LuceneTest . FF . within ( org . geotoolkit . lucene . GEOMETRY_PROPERTY , org . geotoolkit . lucene . LuceneTest . FF . literal ( geom ) ) ; org . geotoolkit . lucene . filter . SpatialQuery spatialQuery = new org . geotoolkit . lucene . filter . SpatialQuery ( wrap ( filter ) ) ; docs = org . geotoolkit . lucene . LuceneTest . searcher . search ( org . geotoolkit . lucene . LuceneTest . simpleQuery , spatialQuery . getSpatialFilter ( ) , 15 ) ; nbResults = docs . totalHits ; org . geotoolkit . lucene . LuceneTest . LOGGER . log ( Level . FINER , "WT:Line<sp>1<sp>CRS=4326:<sp>nb<sp>Results:<sp>{0}" , nbResults ) ; results = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < nbResults ; i ++ ) { org . apache . lucene . document . Document doc = org . geotoolkit . lucene . LuceneTest . searcher . doc ( docs . scoreDocs [ i ] . doc ) ; java . lang . String name = doc . get ( "box<sp>2<sp>projected" 1 ) ; results . add ( name ) ; org . geotoolkit . lucene . LuceneTest . LOGGER . log ( Level . FINER , "box<sp>2<sp>projected" 3 , name ) ; } "<AssertPlaceHolder>" ; } log ( java . util . logging . Level , java . lang . String , java . lang . String ) { final java . util . logging . LogRecord record = new java . util . logging . LogRecord ( level , message ) ; record . setSourceClassName ( org . geotoolkit . internal . sql . Synchronizer . class . getName ( ) ) ; record . setSourceMethodName ( method ) ; org . apache . sis . util . logging . Logging . getLogger ( "org.geotoolkit.sql" ) . log ( record ) ; }
org . junit . Assert . assertEquals ( nbResults , 0 )
rowIterator ( ) { final java . util . Iterator < org . apache . poi . ss . usermodel . Row > rowIterator = streamingSheet . rowIterator ( ) ; int i = 0 ; while ( rowIterator . hasNext ( ) ) { rowIterator . next ( ) ; i ++ ; } "<AssertPlaceHolder>" ; } next ( ) { return iterator . next ( ) ; }
org . junit . Assert . assertEquals ( 6 , i )
testMissedDoubleMatchWithInvalidValue ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "LOL<sp>I<sp>AM<sp>NOT<sp>EVEN<sp>A<sp>NUMBER" ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "90000.23" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; }
org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) )
initializeSubscription ( ) { org . oscm . internal . subscriptiondetails . SubscriptionDetailsService ss = mock ( org . oscm . internal . subscriptiondetails . SubscriptionDetailsService . class ) ; org . oscm . internal . vo . VOSubscriptionDetails subscription = givenSubscription ( ( ! ( SUBSCRIPTION_FREE ) ) ) ; org . oscm . internal . subscriptiondetails . POSubscriptionDetails subscriptionDetails = givenPOSubscriptionDetails ( ) ; subscriptionDetails . setSubscription ( subscription ) ; when ( ss . getSubscriptionDetails ( eq ( "subscription_id" ) , anyString ( ) ) ) . thenReturn ( new org . oscm . internal . components . response . Response ( subscriptionDetails ) ) ; when ( ctrl . ui . getViewLocale ( ) ) . thenReturn ( Locale . ENGLISH ) ; when ( ctrl . getSubscriptionUnitCtrl ( ) . getModel ( ) ) . thenReturn ( subscriptionUnitModel ) ; ctrl . initializeSubscription ( "subscription_id" ) ; verify ( ctrl , times ( 1 ) ) . initPaymentInfo ( ) ; "<AssertPlaceHolder>" ; } getSubscriptionOwners ( ) { return subscriptionOwners ; }
org . junit . Assert . assertEquals ( 0 , model . getSubscriptionOwners ( ) . size ( ) )
testSpeedStrToGigabits ( ) { long result = com . emc . storageos . driver . dellsc . scapi . SizeUtil . speedStrToGigabits ( "1<sp>Gbps" ) ; "<AssertPlaceHolder>" ; } speedStrToGigabits ( java . lang . String ) { java . lang . Long gbits = 0L ; try { if ( ( "Unknown" . equals ( speedStr ) ) || ( com . emc . storageos . driver . dellsc . scapi . SizeUtil . EMPTY_STR . equals ( speedStr ) ) ) { return gbits ; } java . lang . String [ ] parts = speedStr . split ( "<sp>" ) ; gbits = new java . math . BigDecimal ( parts [ 0 ] ) . longValue ( ) ; if ( ( parts . length ) > 1 ) { if ( "Mbps" . equals ( parts [ 1 ] ) ) { gbits = gbits / ( com . emc . storageos . driver . dellsc . scapi . SizeUtil . KB ) ; } } } catch ( java . lang . Exception e ) { java . lang . String failureMsg = java . lang . String . format ( "Error<sp>converting<sp>speed<sp>value<sp>(%s)<sp>to<sp>Giagabits" , speedStr ) ; com . emc . storageos . driver . dellsc . scapi . SizeUtil . LOG . warn ( failureMsg , e ) ; } return gbits ; }
org . junit . Assert . assertTrue ( ( result == 1 ) )
validate_shouldRejectXmlWhenObsConceptCannotBeFound ( ) { java . lang . String xml = "<htmlform><obs<sp>conceptId=\"none\">TEST</obs></htmlform>" ; org . openmrs . module . htmlformentry . handler . TagAnalysis analysis = validateObsTag ( xml ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertEquals ( 1 , analysis . getErrors ( ) . size ( ) )
testValideerSpecifiekOK ( ) { final java . util . List < nl . bzk . brp . bijhouding . bericht . model . ActieElement > acties = new java . util . ArrayList ( ) ; registratieActie = maakRegistratieActieBijzondereVerblijfsrechtelijkePositie ( ) ; acties . add ( registratieActie ) ; initAdministratieveHandelingElement ( acties ) ; "<AssertPlaceHolder>" ; } valideerSpecifiekeInhoud ( ) { final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = new java . util . ArrayList ( ) ; controleerGeenVerwantschapBetrokkenheden ( meldingen ) ; valideerRelatieGemeenteMetDocument ( meldingen ) ; return meldingen ; }
org . junit . Assert . assertEquals ( 0 , registratieActie . valideerSpecifiekeInhoud ( ) . size ( ) )
testShutdownInterrupted ( ) { java . util . concurrent . Callable < java . lang . Boolean > requestedShutdownCallable = buildRequestedShutdownCallable ( ) ; when ( notificationCompleteLatch . await ( anyLong ( ) , any ( java . util . concurrent . TimeUnit . class ) ) ) . thenReturn ( true ) ; when ( shutdownCompleteLatch . await ( anyLong ( ) , any ( java . util . concurrent . TimeUnit . class ) ) ) . thenThrow ( new java . lang . InterruptedException ( ) ) ; when ( shutdownCompleteLatch . getCount ( ) ) . thenReturn ( 1L ) ; "<AssertPlaceHolder>" ; verifyLatchAwait ( notificationCompleteLatch ) ; verifyLatchAwait ( shutdownCompleteLatch ) ; verify ( scheduler ) . shutdown ( ) ; } call ( ) { int exitCode = 0 ; try { scheduler ( ) . run ( ) ; } catch ( java . lang . Throwable t ) { log . error ( "Caught<sp>throwable<sp>while<sp>processing<sp>data" , t ) ; exitCode = 1 ; } return exitCode ; }
org . junit . Assert . assertThat ( requestedShutdownCallable . call ( ) , org . hamcrest . CoreMatchers . equalTo ( false ) )
basicConstraintsIsCorrect ( ) { "<AssertPlaceHolder>" ; } getBasicConstraints ( ) { java . lang . String basicConstraints = "" ; switch ( certificate . getBasicConstraints ( ) ) { case - 1 : basicConstraints = "CA:<sp>False" ; break ; case Integer . MAX_VALUE : basicConstraints = "CA:<sp>True.<sp>No<sp>path<sp>limit." ; break ; default : basicConstraints = ( "CA:<sp>True.<sp>Path<sp>limit:<sp>" + ( certificate . getBasicConstraints ( ) ) ) + "." ; } return basicConstraints ; }
org . junit . Assert . assertEquals ( "CA:<sp>False" , certificate . getBasicConstraints ( ) )
testAddWithComment ( ) { doReturn ( "/*" ) . when ( document ) . getLineContent ( 0 ) ; doReturn ( "/*" ) . when ( document ) . getLineContent ( 1 ) ; doReturn ( "<sp>*" ) . when ( document ) . getLineContent ( 2 ) ; final org . eclipse . che . ide . jseditor . client . changeintercept . TextChange input = new org . eclipse . che . ide . jseditor . client . changeintercept . TextChange . Builder ( ) . from ( new org . eclipse . che . ide . jseditor . client . text . TextPosition ( 1 , 2 ) ) . to ( new org . eclipse . che . ide . jseditor . client . text . TextPosition ( 2 , 2 ) ) . insert ( "\n<sp>*" ) . build ( ) ; final org . eclipse . che . ide . jseditor . client . changeintercept . TextChange output = interceptor . processChange ( input , document ) ; "<AssertPlaceHolder>" ; } processChange ( org . eclipse . che . ide . jseditor . client . changeintercept . TextChange , org . eclipse . che . ide . jseditor . client . document . ReadOnlyDocument ) { final com . google . gwt . regexp . shared . RegExp regex = com . google . gwt . regexp . shared . RegExp . compile ( "^\n(\\s*)\\*\\s*$" ) ; final com . google . gwt . regexp . shared . MatchResult matchResult = regex . exec ( change . getNewText ( ) ) ; if ( matchResult != null ) { final java . lang . String line = document . getLineContent ( change . getFrom ( ) . getLine ( ) ) ; if ( ! ( line . matches ( "^\\s*\\/\\*\\*?\\s*$" ) ) ) { return null ; } final java . lang . String whitespaces = matchResult . getGroup ( 1 ) ; final java . lang . String modifiedInsert = ( ( ( "\n" + whitespaces ) + "*<sp>\n" ) + whitespaces ) + "*/" ; return new org . eclipse . che . ide . jseditor . client . changeintercept . TextChange . Builder ( ) . from ( change . getFrom ( ) ) . to ( change . getFrom ( ) ) . insert ( modifiedInsert ) . build ( ) ; } else { return null ; } }
org . junit . Assert . assertNull ( output )
getAppName ( ) { "<AssertPlaceHolder>" ; } getAppName ( ) { org . junit . Assert . assertEquals ( "TEST" , com . hextremelabs . ussd . ui . manager . UIManagerTest . uiManager . getAppName ( ) ) ; }
org . junit . Assert . assertEquals ( "TEST" , com . hextremelabs . ussd . ui . manager . UIManagerTest . uiManager . getAppName ( ) )
insertTest ( ) { org . easycassandra . bean . model . Log log = new org . easycassandra . bean . model . Log ( ) ; log . setUserUUid ( org . easycassandra . bean . LogDAOTest . NICK_NAME ) ; log . setUuid ( org . easycassandra . bean . LogDAOTest . NICK_NAME . concat ( "1" ) ) ; "<AssertPlaceHolder>" ; } insert ( T ) { return persistence . insert ( bean ) ; }
org . junit . Assert . assertTrue ( dao . insert ( log ) )
shouldNotBeEqualToNull ( ) { com . wesabe . api . util . guid . GUID guid1 = new com . wesabe . api . util . guid . GUID ( "yay" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceof com . wesabe . api . accounts . entities . CurrencyExchangeRate ) { com . wesabe . api . accounts . entities . CurrencyExchangeRate that = ( ( com . wesabe . api . accounts . entities . CurrencyExchangeRate ) ( obj ) ) ; return ( ( com . google . common . base . Objects . equal ( date , that . date ) ) && ( com . google . common . base . Objects . equal ( rate , that . rate ) ) ) && ( com . google . common . base . Objects . equal ( currencyCode , that . currencyCode ) ) ; } return false ; }
org . junit . Assert . assertFalse ( guid1 . equals ( null ) )
startTaskManagerAndCheckForRegisteredSystemMetrics ( ) { "<AssertPlaceHolder>" ; org . apache . flink . runtime . metrics . SystemResourcesMetricsITCase . TestReporter reporter = org . apache . flink . runtime . metrics . SystemResourcesMetricsITCase . TestReporter . OPENED_REPORTERS . iterator ( ) . next ( ) ; java . util . List < java . lang . String > expectedPatterns = org . apache . flink . runtime . metrics . SystemResourcesMetricsITCase . getExpectedPatterns ( ) ; java . util . Collection < java . lang . String > gaugeNames = reporter . getGauges ( ) . values ( ) ; for ( java . lang . String expectedPattern : expectedPatterns ) { boolean found = false ; for ( java . lang . String gaugeName : gaugeNames ) { if ( gaugeName . matches ( expectedPattern ) ) { found = true ; } } if ( ! found ) { org . junit . Assert . fail ( java . lang . String . format ( "Failed<sp>to<sp>find<sp>gauge<sp>[%s]<sp>in<sp>registered<sp>gauges<sp>[%s]" , expectedPattern , gaugeNames ) ) ; } } } size ( ) { return ( ( int ) ( descriptiveStatistics . getN ( ) ) ) ; }
org . junit . Assert . assertEquals ( 1 , org . apache . flink . runtime . metrics . SystemResourcesMetricsITCase . TestReporter . OPENED_REPORTERS . size ( ) )
testIcon ( ) { java . util . List < java . io . File > files = org . sterl . svg2png . Main . run ( new java . lang . String [ ] { "-d" , new java . io . File ( getClass ( ) . getResource ( "/sample.svg" ) . toURI ( ) ) . getParent ( ) , "-android-icon" , "-o" , tmpDir . getAbsolutePath ( ) } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 10 , files . size ( ) )
constantSep ( ) { org . arend . typechecking . visitor . CheckTypeVisitor . Result result = typeCheckExpr ( "\\lam<sp>x<sp>=><sp>\\lam<sp>y<sp>=><sp>x" , org . arend . ExpressionFactory . Pi ( singleParams ( true , vars ( "x" , "y" ) , Nat ( ) ) , Nat ( ) ) ) ; "<AssertPlaceHolder>" ; } Nat ( ) { return new org . arend . core . expr . DataCallExpression ( org . arend . prelude . Prelude . NAT , org . arend . core . sort . Sort . SET0 , java . util . Collections . emptyList ( ) ) ; }
org . junit . Assert . assertNotNull ( result )
testFastFindCandidate ( ) { java . util . List < com . bullhornsdk . data . model . entity . core . standard . FastFindResult > result = bullhornData . fastFindForList ( "test" , fastFindParams ) ; "<AssertPlaceHolder>" ; } fastFindForList ( java . lang . String , com . bullhornsdk . data . model . parameter . FastFindParams ) { com . bullhornsdk . data . model . response . list . FastFindListWrapper wrapper = this . handleFastFindForEntities ( query , params ) ; if ( wrapper == null ) { return java . util . Collections . emptyList ( ) ; } return wrapper . getData ( ) ; }
org . junit . Assert . assertNotNull ( result )
testBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . bzk . migratiebrp . bericht . model . sync . impl . DeblokkeringAntwoordBerichtTest . class . getResourceAsStream ( "deblokkeringAntwoordBerichtSyntaxExceptionBericht.xml" ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht syncBericht = factory . getBericht ( berichtOrigineel ) ; "<AssertPlaceHolder>" ; } getBericht ( java . lang . String ) { try { final javax . xml . bind . JAXBElement < ? > element = NotificatieXml . SINGLETON . stringToElement ( berichtAlsString ) ; return maakBericht ( element . getValue ( ) ) ; } catch ( final javax . xml . bind . JAXBException e ) { nl . bzk . migratiebrp . bericht . model . notificatie . factory . NotificatieBerichtFactory . LOG . warn ( "Verwerken<sp>bericht<sp>mislukt" , e ) ; return new nl . bzk . migratiebrp . bericht . model . notificatie . impl . OngeldigBericht ( berichtAlsString , e . getMessage ( ) ) ; } }
org . junit . Assert . assertTrue ( ( syncBericht instanceof nl . bzk . migratiebrp . bericht . model . sync . impl . OngeldigBericht ) )
testBasic ( ) { com . arjuna . ats . arjuna . AtomicAction A = new com . arjuna . ats . arjuna . AtomicAction ( ) ; com . hp . mwtests . ts . arjuna . resources . OnePhaseAbstractRecord rec = new com . hp . mwtests . ts . arjuna . resources . OnePhaseAbstractRecord ( ) ; A . begin ( ) ; A . add ( rec ) ; A . commit ( ) ; "<AssertPlaceHolder>" ; } onePhaseCalled ( ) { return _onePhaseCalled ; }
org . junit . Assert . assertTrue ( rec . onePhaseCalled ( ) )
debieraMostrarListaDePais ( ) { mx . edu . um . mateo . colportor . test . PaisControllerTest . log . debug ( "Debiera<sp>monstrar<sp>lista<sp>Pais" ) ; for ( int i = 0 ; i < 20 ; i ++ ) { mx . edu . um . mateo . colportor . model . Pais pais = new mx . edu . um . mateo . colportor . model . Pais ( ( "test" + i ) ) ; paisDao . crea ( pais ) ; "<AssertPlaceHolder>" ; } this . mockMvc . perform ( get ( Constantes . PATH_PAIS ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( forwardedUrl ( ( ( "/WEB-INF/jsp/" + ( mx . edu . um . mateo . general . utils . Constantes . PATH_PAIS_LISTA ) ) + ".jsp" ) ) ) . andExpect ( model ( ) . attributeExists ( Constantes . PAIS_LIST ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINACION ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINAS ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINA ) ) ; } crea ( mx . edu . um . mateo . contabilidad . model . CuentaMayor ) { return crea ( cuentaMayor , null ) ; }
org . junit . Assert . assertNotNull ( pais )
testNewURLWithoutHandler ( ) { try { net . sourceforge . jwbf . JWBF . newURLWithoutHandler ( "\\invalid" ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( "\\invalid" , e . getMessage ( ) )
testChangeDosImageOrder ( ) { com . webcodepro . applecommander . storage . os . dos33 . DosFormatDisk dosDiskDosOrder = com . webcodepro . applecommander . storage . os . dos33 . DosFormatDisk . create ( "dostemp.dsk" , new com . webcodepro . applecommander . storage . physical . DosOrder ( new com . webcodepro . applecommander . storage . physical . ByteArrayImageLayout ( com . webcodepro . applecommander . storage . Disk . APPLE_140KB_DISK ) ) ) [ 0 ] ; com . webcodepro . applecommander . storage . FileEntry fileEntry = dosDiskDosOrder . createFile ( ) ; fileEntry . setFilename ( "TESTFILE" ) ; fileEntry . setFiletype ( "T" ) ; fileEntry . setFileData ( "This<sp>is<sp>a<sp>test<sp>file." . getBytes ( ) ) ; com . webcodepro . applecommander . storage . os . dos33 . DosFormatDisk dosDiskNibbleOrder = com . webcodepro . applecommander . storage . os . dos33 . DosFormatDisk . create ( "dostemp2.nib" , new com . webcodepro . applecommander . storage . physical . NibbleOrder ( new com . webcodepro . applecommander . storage . physical . ByteArrayImageLayout ( com . webcodepro . applecommander . storage . Disk . APPLE_140KB_DISK ) ) ) [ 0 ] ; com . webcodepro . applecommander . util . AppleUtil . changeImageOrderByTrackAndSector ( dosDiskDosOrder . getImageOrder ( ) , dosDiskNibbleOrder . getImageOrder ( ) ) ; "<AssertPlaceHolder>" ; } disksEqualByTrackAndSector ( com . webcodepro . applecommander . storage . FormattedDisk , com . webcodepro . applecommander . storage . FormattedDisk ) { com . webcodepro . applecommander . storage . physical . ImageOrder sourceOrder = sourceDisk . getImageOrder ( ) ; com . webcodepro . applecommander . storage . physical . ImageOrder targetOrder = targetDisk . getImageOrder ( ) ; if ( ! ( com . webcodepro . applecommander . util . AppleUtil . sameSectorsPerDisk ( sourceOrder , targetOrder ) ) ) { throw new java . lang . IllegalArgumentException ( com . webcodepro . applecommander . util . AppleUtil . textBundle . get ( "AppleUtil.CannotCompareDisks" ) ) ; } for ( int track = 0 ; track < ( sourceOrder . getTracksPerDisk ( ) ) ; track ++ ) { for ( int sector = 0 ; sector < ( sourceOrder . getSectorsPerTrack ( ) ) ; sector ++ ) { byte [ ] sourceData = sourceOrder . readSector ( track , sector ) ; byte [ ] targetData = targetOrder . readSector ( track , sector ) ; if ( ! ( java . util . Arrays . equals ( sourceData , targetData ) ) ) { return false ; } } } return true ; }
org . junit . Assert . assertTrue ( com . webcodepro . applecommander . util . AppleUtil . disksEqualByTrackAndSector ( dosDiskDosOrder , dosDiskNibbleOrder ) )
testGetAsStringEmptyString ( ) { java . lang . String in = "" ; java . lang . String out = converter . getAsString ( context , component , in ) ; "<AssertPlaceHolder>" ; } getAsString ( javax . faces . context . FacesContext , javax . faces . component . UIComponent , java . lang . Object ) { java . lang . String retVal ; if ( ! ( object instanceof org . oscm . internal . vo . VOPaymentInfo ) ) { retVal = "" ; } else { retVal = java . lang . String . valueOf ( ( ( org . oscm . internal . vo . VOPaymentInfo ) ( object ) ) . getKey ( ) ) ; } return retVal ; }
org . junit . Assert . assertEquals ( null , out )
installTransitFlow ( ) { org . easymock . Capture < org . projectfloodlight . openflow . protocol . OFFlowMod > capture = prepareForInstallFlowOperation ( ) ; java . lang . String flowId = "test-transit-flow-rule" ; int inputPort = 2 ; int outputPort = 4 ; int transitVlanId = 512 ; switchManager . installTransitFlow ( switchDpId , flowId , commonFlowCookie , inputPort , outputPort , transitVlanId ) ; org . projectfloodlight . openflow . protocol . OFFactory referenceOfFactory = new org . openkilda . floodlight . OFFactoryVer12Mock ( ) ; org . projectfloodlight . openflow . protocol . OFFlowMod expected = referenceOfFactory . buildFlowAdd ( ) . setCookie ( org . projectfloodlight . openflow . types . U64 . of ( commonFlowCookie ) . applyMask ( org . projectfloodlight . openflow . types . U64 . of ( SwitchManager . FLOW_COOKIE_MASK ) ) ) . setPriority ( org . openkilda . floodlight . switchmanager . SwitchManager . FLOW_PRIORITY ) . setMatch ( referenceOfFactory . buildMatch ( ) . setExact ( MatchField . IN_PORT , org . projectfloodlight . openflow . types . OFPort . of ( inputPort ) ) . setMasked ( MatchField . VLAN_VID , org . projectfloodlight . openflow . types . OFVlanVidMatch . ofVlan ( transitVlanId ) , org . projectfloodlight . openflow . types . OFVlanVidMatch . ofRawVid ( ( ( short ) ( 4095 ) ) ) ) . build ( ) ) . setInstructions ( singletonList ( referenceOfFactory . instructions ( ) . applyActions ( singletonList ( referenceOfFactory . actions ( ) . buildOutput ( ) . setMaxLen ( - 1 ) . setPort ( org . projectfloodlight . openflow . types . OFPort . of ( outputPort ) ) . build ( ) ) ) . createBuilder ( ) . build ( ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( expected , capture . getValue ( ) )
isShowConfirm_PerUnitUpgradeService ( ) { initSelectedService ( PriceModelType . PER_UNIT ) ; initUpgradeService ( PriceModelType . PER_UNIT , true ) ; boolean isShowConfirm = bean . isShowConfirm ( ) ; "<AssertPlaceHolder>" ; } isShowConfirm ( ) { if ( ( selectedService ) == null ) { return false ; } java . util . List < org . oscm . internal . vo . VOService > compatibleServices = new java . util . ArrayList < org . oscm . internal . vo . VOService > ( ) ; if ( ( getPossibleCompatibleServices ( ) ) != null ) { for ( org . oscm . ui . model . Service service : getPossibleCompatibleServices ( ) ) { if ( service . isSelected ( ) ) { compatibleServices . add ( service . getVO ( ) ) ; } } } for ( org . oscm . internal . vo . VOService serviceToUpDowngrade : compatibleServices ) { org . oscm . internal . vo . VOPriceModel priceModel = selectedService . getPriceModel ( ) ; if ( priceModel == null ) continue ; org . oscm . internal . types . enumtypes . PriceModelType servicePMType = priceModel . getType ( ) ; priceModel = serviceToUpDowngrade . getPriceModel ( ) ; if ( priceModel == null ) continue ; org . oscm . internal . types . enumtypes . PriceModelType serviceToUpDowngradePMType = priceModel . getType ( ) ; if ( ( ( servicePMType . equals ( PriceModelType . PER_UNIT ) ) && ( ! ( serviceToUpDowngradePMType . equals ( PriceModelType . FREE_OF_CHARGE ) ) ) ) || ( ( serviceToUpDowngradePMType . equals ( PriceModelType . PER_UNIT ) ) && ( ! ( servicePMType . equals ( PriceModelType . FREE_OF_CHARGE ) ) ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( isShowConfirm )
testNotSetEdgeElement ( ) { org . antlr . v4 . runtime . misc . IntervalSet vocabulary = org . antlr . v4 . runtime . misc . IntervalSet . of ( 1 , 2 ) ; org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 1 ) ; java . lang . String expecting = "2" ; java . lang . String result = s . complement ( vocabulary ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getTarget ( ) ) + ":" ) + ( getTestName ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , result )
shouldReturnTrueWhenChildIsBelowThreeYears ( ) { java . util . Map < java . lang . String , java . lang . String > reportData = create ( "vitaminADate" , "2010-12-30" ) . put ( "dateOfBirth" , "2008-01-01" ) . map ( ) ; boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( reportData ) ) ; "<AssertPlaceHolder>" ; } apply ( org . ei . drishti . util . SafeMap ) { return new org . ei . drishti . service . reporting . ChildImmunization ( ) . isImmunizedWith ( ChildImmunizationFields . BCG_VALUE , reportFields ) ; }
org . junit . Assert . assertTrue ( didRuleSucceed )
serializeNull ( ) { "<AssertPlaceHolder>" ; } serialize ( java . lang . String , T ) { if ( data == null ) { return null ; } try { return objectMapper . writeValueAsBytes ( data ) ; } catch ( java . lang . Exception e ) { throw new org . apache . kafka . common . errors . SerializationException ( "Error<sp>serializing<sp>JSON<sp>message" , e ) ; } }
org . junit . Assert . assertNull ( serializer . serialize ( "foo" , null ) )