input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testEqualsSame ( ) { org . apache . commons . math . complex . Complex x = new org . apache . commons . math . complex . Complex ( 3.0 , 4.0 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . chart . renderer . category . MinMaxCategoryRenderer ) ) { return false ; } org . jfree . chart . renderer . category . MinMaxCategoryRenderer that = ( ( org . jfree . chart . renderer . category . MinMaxCategoryRenderer ) ( obj ) ) ; if ( ( this . plotLines ) != ( that . plotLines ) ) { return false ; } if ( ! ( org . jfree . chart . util . PaintUtilities . equal ( this . groupPaint , that . groupPaint ) ) ) { return false ; } if ( ! ( this . groupStroke . equals ( that . groupStroke ) ) ) { return false ; } return super . equals ( obj ) ; }
|
org . junit . Assert . assertTrue ( x . equals ( x ) )
|
testUpdater ( ) { com . xjeffrose . xio . marshall . ThriftMarshaller marshaller = new com . xjeffrose . xio . marshall . ThriftMarshaller ( ) ; com . xjeffrose . xio . config . IpAddressDeterministicRuleEngineConfig rules = new com . xjeffrose . xio . config . IpAddressDeterministicRuleEngineConfig ( ) ; rules . blacklistIp ( java . net . InetAddress . getByName ( "127.0.0.1" ) ) ; com . xjeffrose . xio . filter . IpFilterConfig . Updater updater = new com . xjeffrose . xio . filter . IpFilterConfig . Updater ( "path" , this :: setIpFilterConfig ) ; updater . update ( marshaller . marshall ( rules ) ) ; com . xjeffrose . xio . filter . IpFilterConfig expected = new com . xjeffrose . xio . filter . IpFilterConfig ( rules . getBlacklistIps ( ) , rules . getWhitelistIps ( ) ) ; "<AssertPlaceHolder>" ; } getWhitelistIps ( ) { return this . whitelistIps ; }
|
org . junit . Assert . assertEquals ( expected , config )
|
equalsTest ( ) { org . orcid . pojo . ajaxForm . AffiliationForm f1 = getAffiliationForm ( ) ; org . orcid . pojo . ajaxForm . AffiliationForm f2 = getAffiliationForm ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org . orcid . api . common . swagger . SwaggerModelConverter . Citation ) ) { return false ; } org . orcid . api . common . swagger . SwaggerModelConverter . Citation citation1 = ( ( org . orcid . api . common . swagger . SwaggerModelConverter . Citation ) ( o ) ) ; if ( ( citation ) != null ? ! ( citation . equals ( citation1 . citation ) ) : ( citation1 . citation ) != null ) { return false ; } if ( ( citationType ) != ( citation1 . citationType ) ) { return false ; } return true ; }
|
org . junit . Assert . assertTrue ( f1 . equals ( f2 ) )
|
testResolveMethod2 ( ) { java . lang . Class < ? > declareClass = java . lang . Class . forName ( "java.lang.Math" ) ; java . lang . String methodName = "abs" ; java . lang . Class < ? > [ ] paramTypes = new java . lang . Class < ? > [ ] { com . huawei . streaming . expression . Integer . class } ; java . lang . reflect . Method actualMethod = com . huawei . streaming . expression . MethodResolver . resolveMethod ( declareClass , methodName , paramTypes ) ; java . lang . reflect . Method expectedMethod = declareClass . getMethod ( methodName , int . class ) ; "<AssertPlaceHolder>" ; } resolveMethod ( java . lang . Class , java . lang . String , com . huawei . streaming . expression . Class [ ] ) { java . lang . reflect . Method [ ] declaredMethods = declareClass . getDeclaredMethods ( ) ; java . lang . reflect . Method bestMatchMethod = null ; int bestConversionCount = - 1 ; for ( java . lang . reflect . Method method : declaredMethods ) { if ( ! ( com . huawei . streaming . expression . MethodResolver . isPublic ( method ) ) ) { continue ; } if ( ! ( method . getName ( ) . equals ( methodName ) ) ) { continue ; } int conversionCount = com . huawei . streaming . expression . MethodResolver . compareParamTypes ( method . getParameterTypes ( ) , paramTypes ) ; if ( conversionCount == ( - 1 ) ) { continue ; } if ( conversionCount == 0 ) { bestMatchMethod = method ; break ; } if ( null == bestMatchMethod ) { bestMatchMethod = method ; bestConversionCount = conversionCount ; } else { if ( conversionCount < bestConversionCount ) { bestMatchMethod = method ; bestConversionCount = conversionCount ; } } } return bestMatchMethod ; }
|
org . junit . Assert . assertEquals ( expectedMethod , actualMethod )
|
verifyValidateClusterStartupDoNotSuggestsUpdateToDynamicClusterIfReplicasSameAsClusterSize ( ) { oracle . kubernetes . operator . wlsconfig . WlsDynamicServersConfig wlsDynamicServersConfig = oracle . kubernetes . operator . wlsconfig . WlsClusterConfigTest . createDynamicServersConfig ( 1 , 2 , "ms-" , "cluster2" ) ; oracle . kubernetes . operator . wlsconfig . WlsClusterConfig wlsClusterConfig = new oracle . kubernetes . operator . wlsconfig . WlsClusterConfig ( "cluster2" , wlsDynamicServersConfig ) ; java . util . ArrayList < oracle . kubernetes . operator . wlsconfig . ConfigUpdate > suggestedConfigUpdates = new java . util . ArrayList ( ) ; wlsClusterConfig . validateCluster ( 1 , suggestedConfigUpdates ) ; "<AssertPlaceHolder>" ; } size ( ) { java . lang . String [ ] list = mountPointDir . list ( ) ; return list == null ? null : list . length ; }
|
org . junit . Assert . assertEquals ( 0 , suggestedConfigUpdates . size ( ) )
|
test_maryjis ( ) { iot . jcypher . query . api . IClause [ ] clauses ; iot . jcypher . query . JcQuery query ; java . lang . String cypher ; iot . jcypher . query . JcQueryResult result ; boolean create = false ; iot . jcypher . query . values . JcNode animal = new iot . jcypher . query . values . JcNode ( "a" ) ; iot . jcypher . query . values . JcNode dog = new iot . jcypher . query . values . JcNode ( "d" ) ; iot . jcypher . query . values . JcRelation animal_to_dog = new iot . jcypher . query . values . JcRelation ( "a2d" ) ; if ( create ) { clauses = new iot . jcypher . query . api . IClause [ ] { iot . jcypher . query . factories . clause . CREATE . node ( animal ) . property ( "idKB" ) . value ( 1 ) , iot . jcypher . query . factories . clause . CREATE . node ( dog ) . property ( "idKB" ) . value ( 2 ) } ; query = new iot . jcypher . query . JcQuery ( ) ; query . setClauses ( clauses ) ; result = test . TempTest . dbAccess . execute ( query ) ; "<AssertPlaceHolder>" ; } clauses = new iot . jcypher . query . api . IClause [ ] { iot . jcypher . query . factories . clause . MATCH . node ( animal ) . property ( "idKB" ) . value ( 1 ) , iot . jcypher . query . factories . clause . MATCH . node ( dog ) . property ( "idKB" ) . value ( 2 ) , iot . jcypher . query . factories . clause . CREATE_UNIQUE . node ( animal ) . relation ( animal_to_dog ) . type ( "A2D" ) . node ( dog ) , iot . jcypher . query . factories . clause . RETURN . value ( animal_to_dog ) } ; query = new iot . jcypher . query . JcQuery ( ) ; query . setClauses ( clauses ) ; result = test . TempTest . dbAccess . execute ( query ) ; if ( result . hasErrors ( ) ) { iot . jcypher . util . Util . printResult ( result , "Test" , Format . PRETTY_1 ) ; } java . util . List < iot . jcypher . graph . GrRelation > a2dResults = result . resultOf ( animal_to_dog ) ; iot . jcypher . graph . GrRelation a2dResult = null ; iot . jcypher . graph . GrNode a = null ; iot . jcypher . graph . GrNode d = null ; if ( ( a2dResults . size ( ) ) == 1 ) { a2dResult = a2dResults . get ( 0 ) ; a = a2dResult . getStartNode ( ) ; d = a2dResult . getEndNode ( ) ; } return ; } hasErrors ( ) { return ( ! ( this . getGeneralErrors ( ) . isEmpty ( ) ) ) || ( ! ( this . getDBErrors ( ) . isEmpty ( ) ) ) ; }
|
org . junit . Assert . assertFalse ( result . hasErrors ( ) )
|
someTest2 ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testAllSourcesCanBeTemplated ( ) { for ( java . lang . Class < ? > input : DremioTest . CLASSPATH_SCAN_RESULT . getAnnotatedClasses ( com . dremio . exec . catalog . conf . SourceType . class ) ) { com . dremio . exec . catalog . conf . SourceType type = input . getAnnotation ( com . dremio . exec . catalog . conf . SourceType . class ) ; if ( type . configurable ( ) ) { com . dremio . dac . api . SourceTypeTemplate sourceTypeTemplate = com . dremio . dac . api . SourceTypeTemplate . fromSourceClass ( input , true ) ; "<AssertPlaceHolder>" ; } } } getSourceType ( ) { return sourceType ; }
|
org . junit . Assert . assertEquals ( type . value ( ) , sourceTypeTemplate . getSourceType ( ) )
|
getNewLabelTest ( ) { analyze . labeling . Label l = analyze . labeling . LabelFactory . getInstance ( ) . getNewLabel ( "hoi" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( l . getName ( ) , "hoi" )
|
testManageLinuxWebAppWithContainerRegistry ( ) { "<AssertPlaceHolder>" ; } runSample ( com . microsoft . azure . management . Azure ) { final java . lang . String rgName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "tomcat" 5 , 15 ) ; final java . lang . String acrName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "webapp" 8 , 20 ) ; final java . lang . String appName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "webapp" , 20 ) ; final java . lang . String appUrl = appName + "webapp" 0 ; final com . microsoft . azure . management . resources . fluentcore . arm . Region region = com . microsoft . azure . management . resources . fluentcore . arm . Region . US_EAST ; final java . lang . String dockerImageName = "tomcat" ; final java . lang . String dockerImageTag = "webapp" 6 ; final java . lang . String dockerContainerName = "tomcat" 1 ; try { System . out . println ( "tomcat" 2 ) ; java . util . Date t1 = new java . util . Date ( ) ; com . microsoft . azure . management . containerregistry . Registry azureRegistry = azure . containerRegistries ( ) . define ( acrName ) . withRegion ( region ) . withNewResourceGroup ( rgName ) . withBasicSku ( ) . withRegistryNameAsAdminUser ( ) . create ( ) ; java . util . Date t2 = new java . util . Date ( ) ; System . out . println ( ( ( ( "Created<sp>Azure<sp>Container<sp>Registry:<sp>(took<sp>" + ( ( ( t2 . getTime ( ) ) - ( t1 . getTime ( ) ) ) / 1000 ) ) + "<sp>seconds)<sp>" ) + ( azureRegistry . id ( ) ) ) ) ; com . microsoft . azure . management . samples . Utils . print ( azureRegistry ) ; com . microsoft . azure . management . containerregistry . RegistryCredentials acrCredentials = azureRegistry . getCredentials ( ) ; com . github . dockerjava . api . DockerClient dockerClient = com . microsoft . azure . management . samples . DockerUtils . createDockerClient ( azure , rgName , region , azureRegistry . loginServerUrl ( ) , acrCredentials . username ( ) , acrCredentials . accessKeys ( ) . get ( AccessKeyType . PRIMARY ) ) ; dockerClient . pullImageCmd ( dockerImageName ) . withTag ( dockerImageTag ) . exec ( new com . github . dockerjava . core . command . PullImageResultCallback ( ) ) . awaitSuccess ( ) ; System . out . println ( "webapp" 5 ) ; java . util . List < com . github . dockerjava . api . model . Image > images = dockerClient . listImagesCmd ( ) . withShowAll ( true ) . exec ( ) ; for ( com . github . dockerjava . api . model . Image image : images ) { System . out . format ( "webapp" 2 , image . getRepoTags ( ) [ 0 ] , image . getId ( ) ) ; } com . github . dockerjava . api . command . CreateContainerResponse dockerContainerInstance = dockerClient . createContainerCmd ( ( ( dockerImageName + ":" ) + dockerImageTag ) ) . withName ( dockerContainerName ) . exec ( ) ; java . lang . String privateRepoUrl = ( ( azureRegistry . loginServerUrl ( ) ) + "tomcat" 3 ) + dockerContainerName ; java . lang . String dockerImageId = dockerClient . commitCmd ( dockerContainerInstance . getId ( ) ) . withRepository ( privateRepoUrl ) . withTag ( "webapp" 9 ) . exec ( ) ; dockerClient . removeContainerCmd ( dockerContainerInstance . getId ( ) ) . withForce ( true ) . exec ( ) ; dockerClient . pushImageCmd ( privateRepoUrl ) . withAuthConfig ( dockerClient . authConfig ( ) ) . exec ( new com . github . dockerjava . core . command . PushImageResultCallback ( ) ) . awaitSuccess ( ) ; try { dockerClient . removeImageCmd ( ( ( dockerImageName + ":" ) + dockerImageTag ) ) . withForce ( true ) . exec ( ) ; } catch ( com . github . dockerjava . api . exception . NotFoundException e ) { } System . out . println ( ( ( ( ( "tomcat" 0 + appName ) + "tomcat" 4 ) + rgName ) + "tomcat" 7 ) ) ; com . microsoft . azure . management . appservice . WebApp app = azure . webApps ( ) . define ( appName ) . withRegion ( Region . US_WEST ) . withExistingResourceGroup ( rgName ) . withNewLinuxPlan ( PricingTier . STANDARD_S1 ) . withPrivateRegistryImage ( ( privateRepoUrl + ":latest" ) , ( "http://" + ( azureRegistry . loginServerUrl ( ) ) ) ) . withCredentials ( acrCredentials . username ( ) , acrCredentials . accessKeys ( ) . get ( AccessKeyType . PRIMARY ) ) . withAppSetting ( "webapp" 3 , "webapp" 1 ) . create ( ) ; System . out . println ( ( "Created<sp>web<sp>app<sp>" + ( app . name ( ) ) ) ) ; com . microsoft . azure . management . samples . Utils . print ( app ) ; System . out . println ( ( ( "webapp" 7 + appUrl ) + "tomcat" 7 ) ) ; com . microsoft . azure . management . appservice . samples . ManageLinuxWebAppWithContainerRegistry . curl ( ( "http://" + appUrl ) ) ; com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . sleep ( 5000 ) ; System . out . println ( ( ( "CURLing<sp>" + appUrl ) + "tomcat" 7 ) ) ; System . out . println ( com . microsoft . azure . management
|
org . junit . Assert . assertTrue ( com . microsoft . azure . management . appservice . samples . ManageLinuxWebAppWithContainerRegistry . runSample ( azure ) )
|
testSaveWithNullPathElement ( ) { org . opennms . netmgt . model . OnmsNode node = new org . opennms . netmgt . model . OnmsNode ( m_locationDao . getDefaultLocation ( ) , "MyFirstNode" ) ; org . opennms . netmgt . model . PathElement p = new org . opennms . netmgt . model . PathElement ( "192.168.7.7" , "ICMP" ) ; node . setPathElement ( p ) ; getNodeDao ( ) . save ( node ) ; org . opennms . netmgt . model . OnmsNode myNode = getNodeDao ( ) . get ( node . getId ( ) ) ; "<AssertPlaceHolder>" ; myNode . setPathElement ( null ) ; getNodeDao ( ) . save ( myNode ) ; getNodeDao ( ) . flush ( ) ; } getId ( ) { return "NodeMapQueryLink" ; }
|
org . junit . Assert . assertNotNull ( myNode )
|
matchesHasBeenDeletedWithNullEditingContext ( ) { org . mockito . Mockito . when ( mockObject . editingContext ( ) ) . thenReturn ( null ) ; boolean result = matcher . matchesSafely ( mockObject ) ; "<AssertPlaceHolder>" ; } matchesSafely ( T extends com . webobjects . eocontrol . EOEnterpriseObject ) { com . webobjects . eocontrol . EOEditingContext editingContext = enterpriseObject . editingContext ( ) ; if ( editingContext == null ) { throw new java . lang . IllegalArgumentException ( "The<sp>enterprise<sp>object<sp>has<sp>no<sp>editing<sp>context<sp>reference.<sp>Are<sp>you<sp>sure<sp>the<sp>enterprise<sp>object<sp>was<sp>inserted<sp>into<sp>an<sp>editing<sp>context?" ) ; } com . webobjects . eocontrol . EOGlobalID globalId = editingContext . globalIDForObject ( enterpriseObject ) ; boolean hasBeenSaved = ! ( ( globalId == null ) || ( globalId . isTemporary ( ) ) ) ; @ com . wounit . matchers . SuppressWarnings ( "unchecked" ) com . webobjects . foundation . NSDictionary < java . lang . String , java . lang . Object > committedSnapshotForObject = editingContext . committedSnapshotForObject ( enterpriseObject ) ; hasBeenSaved = hasBeenSaved && ( enterpriseObject . changesFromSnapshot ( committedSnapshotForObject ) . isEmpty ( ) ) ; status = ( hasBeenSaved ) ? "saved" : "unsaved" ; return hasBeenSaved ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
|
queryFindsAllLoadedStatements_fromFile ( ) { final org . apache . rya . api . client . accumulo . AccumuloConnectionDetails connectionDetails = new org . apache . rya . api . client . accumulo . AccumuloConnectionDetails ( getUsername ( ) , getPassword ( ) . toCharArray ( ) , getInstanceName ( ) , getZookeepers ( ) ) ; final org . apache . rya . api . client . RyaClient client = org . apache . rya . api . client . accumulo . AccumuloRyaClientFactory . build ( connectionDetails , super . getConnector ( ) ) ; final java . lang . String ryaInstance = java . util . UUID . randomUUID ( ) . toString ( ) . replace ( '-' , '_' ) ; client . getInstall ( ) . install ( ryaInstance , org . apache . rya . api . client . Install . InstallConfiguration . builder ( ) . build ( ) ) ; client . getLoadStatementsFile ( ) . loadStatements ( ryaInstance , java . nio . file . Paths . get ( "src/test/resources/test-statements.nt" ) , RDFFormat . NTRIPLES ) ; final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; final java . util . Set < org . eclipse . rdf4j . model . Statement > fetched = new java . util . HashSet ( ) ; try ( final org . eclipse . rdf4j . query . TupleQueryResult result = client . getExecuteSparqlQuery ( ) . executeSparqlQuery ( ryaInstance , "SELECT<sp>*<sp>WHERE<sp>{<sp>?s<sp>?p<sp>?o<sp>}" ) ) { while ( result . hasNext ( ) ) { final org . eclipse . rdf4j . query . BindingSet bs = result . next ( ) ; if ( RdfCloudTripleStoreConstants . RTS_VERSION_PREDICATE . equals ( bs . getBinding ( "p" ) . getValue ( ) ) ) { continue ; } fetched . add ( vf . createStatement ( ( ( org . eclipse . rdf4j . model . Resource ) ( bs . getBinding ( "urn:Bob" 0 ) . getValue ( ) ) ) , ( ( org . eclipse . rdf4j . model . IRI ) ( bs . getBinding ( "p" ) . getValue ( ) ) ) , bs . getBinding ( "o" ) . getValue ( ) ) ) ; } } final java . util . Set < org . eclipse . rdf4j . model . Statement > expected = com . google . common . collect . Sets . newHashSet ( vf . createStatement ( vf . createIRI ( "urn:Alice" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Bob" ) ) , vf . createStatement ( vf . createIRI ( "urn:Bob" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Alice" ) ) , vf . createStatement ( vf . createIRI ( "urn:Bob" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Charlie" ) ) , vf . createStatement ( vf . createIRI ( "urn:Charlie" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Alice" ) ) , vf . createStatement ( vf . createIRI ( "urn:Bob" 1 ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Eve" ) ) , vf . createStatement ( vf . createIRI ( "urn:Eve" ) , vf . createIRI ( "urn:listensTo" ) , vf . createIRI ( "urn:Bob" ) ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( expected , fetched )
|
testSPIShutdownHookRun3 ( ) { java . lang . String spiProviderName = "spiProviderName" ; com . liferay . portal . kernel . resiliency . spi . MockSPIProvider mockSPIProvider = new com . liferay . portal . kernel . resiliency . spi . MockSPIProvider ( spiProviderName ) ; com . liferay . portal . kernel . resiliency . mpi . MPIHelperUtil . registerSPIProvider ( mockSPIProvider ) ; _mockRemoteSPI . setFailOnStop ( false ) ; _mockRemoteSPI . setSpiProviderName ( spiProviderName ) ; java . rmi . server . UnicastRemoteObject . exportObject ( _mockRemoteSPI , 0 ) ; com . liferay . portal . kernel . resiliency . mpi . MPIHelperUtil . registerSPI ( _mockRemoteSPI ) ; com . liferay . portal . kernel . resiliency . spi . remote . RemoteSPI . SPIShutdownHook spiShutdownHook = _mockRemoteSPI . new com . liferay . portal . kernel . resiliency . spi . remote . RemoteSPI . SPIShutdownHook ( ) ; try ( com . liferay . portal . kernel . test . CaptureHandler captureHandler = com . liferay . portal . kernel . test . JDKLoggerTestUtil . configureJDKLogger ( com . liferay . portal . kernel . resiliency . spi . remote . RemoteSPI . class . getName ( ) , Level . OFF ) ) { spiShutdownHook . run ( ) ; java . util . List < java . util . logging . LogRecord > logRecords = captureHandler . getLogRecords ( ) ; "<AssertPlaceHolder>" ; } unexported ( ) ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
|
org . junit . Assert . assertTrue ( logRecords . toString ( ) , logRecords . isEmpty ( ) )
|
AccessInstanceVariableIndirect_SuperClass ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessInstanceVariableIndirect_SuperClass" ; java . lang . String toClass = "Technology.Direct.Dao.CallInstanceSuperClassDAO" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Access" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
|
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) )
|
testMapAcrossDictionaryUsesKeys ( ) { java . lang . String template = "<foo:{f<sp>|<sp><f>}>" ; org . stringtemplate . v4 . ST st = new org . stringtemplate . v4 . ST ( template ) ; st . add ( "foo" , new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) { { put ( "a" , "b" ) ; put ( "c" , "d" ) ; } } ) ; java . lang . String expected = "ac" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testAddGetMyIbdSeverityLevelWithNoValue ( ) { org . patientview . ibd . model . MyIbdSeverityLevel myIbdSeverityLevel = getTestObject ( ) ; myIbdSeverityLevel . setLevel ( ( - 1 ) ) ; myIbdSeverityLevelDao . save ( myIbdSeverityLevel ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertNull ( myIbdSeverityLevel . getId ( ) )
|
testRun ( ) { if ( ! ( org . apache . commons . lang3 . SystemUtils . IS_JAVA_1_6 ) ) { return ; } java . lang . ClassLoader cl = org . cyclopsgroup . jmxterm . pm . JConsoleClassLoaderFactory . getClassLoader ( ) ; java . lang . Class < ? > type = cl . loadClass ( "sun.tools.jconsole.LocalVirtualMachine" ) ; org . cyclopsgroup . jmxterm . jdk6 . StaticLocalVirtualMachine s = org . cyclopsgroup . jmxterm . utils . WeakCastUtils . staticCast ( type , org . cyclopsgroup . jmxterm . jdk6 . StaticLocalVirtualMachine . class ) ; java . util . Map < java . lang . Integer , java . lang . Object > vms = s . getAllVirtualMachines ( ) ; java . util . List < org . cyclopsgroup . jmxterm . jdk6 . LocalVirtualMachine > lvms = new java . util . ArrayList < org . cyclopsgroup . jmxterm . jdk6 . LocalVirtualMachine > ( vms . size ( ) ) ; for ( java . lang . Object vm : vms . values ( ) ) { org . cyclopsgroup . jmxterm . jdk6 . LocalVirtualMachine m = org . cyclopsgroup . jmxterm . utils . WeakCastUtils . cast ( vm , org . cyclopsgroup . jmxterm . jdk6 . LocalVirtualMachine . class ) ; lvms . add ( m ) ; } "<AssertPlaceHolder>" ; } cast ( java . lang . Object , java . lang . Class ) { return org . cyclopsgroup . jmxterm . utils . WeakCastUtils . cast ( from , interfase , interfase . getClassLoader ( ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( lvms . size ( ) ) != 0 ) )
|
testTimes ( ) { jama . Matrix C = A . arrayTimes ( B ) ; "<AssertPlaceHolder>" ; } arrayRightDivideEquals ( jama . FloatMatrix ) { checkFloatMatrixDimensions ( B ) ; for ( int i = 0 ; i < ( m ) ; i ++ ) { for ( int j = 0 ; j < ( n ) ; j ++ ) { A [ i ] [ j ] = ( A [ i ] [ j ] ) / ( B . A [ i ] [ j ] ) ; } } return this ; }
|
org . junit . Assert . assertEquals ( A , C . arrayRightDivideEquals ( B ) )
|
buildCentroidForNullCoordinates ( ) { location . setCoordinates ( null ) ; org . sentilo . web . catalog . utils . CentroidBuilder . build ( location ) ; "<AssertPlaceHolder>" ; } getCentroid ( ) { return centroid ; }
|
org . junit . Assert . assertNull ( location . getCentroid ( ) )
|
canBeSerializedAndDeserialized ( ) { org . eclipse . rap . json . JsonNumber number = new org . eclipse . rap . json . JsonNumber ( "3.14" ) ; "<AssertPlaceHolder>" ; } serializeAndDeserialize ( T ) { return ( ( T ) ( org . eclipse . rap . json . TestUtil . deserialize ( org . eclipse . rap . json . TestUtil . serialize ( instance ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( number , org . eclipse . rap . json . TestUtil . serializeAndDeserialize ( number ) )
|
testNonInvertible ( ) { org . apache . commons . math4 . fitting . leastsquares . LinearProblem problem = new org . apache . commons . math4 . fitting . leastsquares . LinearProblem ( new double [ ] [ ] { new double [ ] { 1 , 2 , - 3 } , new double [ ] { 2 , 1 , 3 } , new double [ ] { - 3 , 0 , - 9 } } , new double [ ] { 1 , 1 , 1 } ) ; org . apache . commons . math4 . fitting . leastsquares . LeastSquaresOptimizer . Optimum optimum = optimizer . optimize ( problem . getBuilder ( ) . build ( ) ) ; org . apache . commons . math4 . geometry . euclidean . threed . Plane span = new org . apache . commons . math4 . geometry . euclidean . threed . Plane ( org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D . ZERO , new org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D ( 1 , 2 , ( - 3 ) ) , new org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D ( 2 , 1 , 0 ) , TOl ) ; double expected = org . apache . commons . math4 . util . FastMath . abs ( span . getOffset ( new org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D ( 1 , 1 , 1 ) ) ) ; double actual = optimum . getResiduals ( ) . getNorm ( ) ; "<AssertPlaceHolder>" ; } getNorm ( ) { return singularValues [ 0 ] ; }
|
org . junit . Assert . assertEquals ( expected , actual , org . apache . commons . math4 . fitting . leastsquares . TOl )
|
testFailedGreaterEqualWithLessComparison ( ) { new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . dao . mock . BeanWrapperVisitorTest . TestBean . class ) . ge ( "four" , 17.0 ) . toCriteria ( ) . visit ( m_visitor ) ; "<AssertPlaceHolder>" ; } getMatches ( ) { return ( m_matches ) == null ? "(.*)" : m_matches ; }
|
org . junit . Assert . assertEquals ( 0 , m_visitor . getMatches ( ) . size ( ) )
|
usesAliasedValueForQueryHintsCounting ( ) { org . springframework . data . jpa . repository . query . JpaQueryMethod method = getQueryMethod ( org . springframework . data . jpa . repository . query . JpaQueryMethodUnitTests . ValidRepository . class , "withMetaAnnotationUsingAliasFor" ) ; "<AssertPlaceHolder>" ; } applyHintsToCountQuery ( ) { org . springframework . data . jpa . repository . QueryHints hints = org . springframework . core . annotation . AnnotatedElementUtils . findMergedAnnotation ( method , org . springframework . data . jpa . repository . QueryHints . class ) ; return hints != null ? hints . forCounting ( ) : false ; }
|
org . junit . Assert . assertThat ( method . applyHintsToCountQuery ( ) , is ( true ) )
|
base58Test ( ) { java . util . List < java . lang . String > examples = java . util . Arrays . asList ( "QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB" , "QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy" ) ; for ( java . lang . String example : examples ) { byte [ ] output = io . ipfs . multibase . Base58 . decode ( example ) ; java . lang . String encoded = io . ipfs . multibase . Base58 . encode ( output ) ; "<AssertPlaceHolder>" ; } }
|
org . junit . Assert . assertEquals ( example , encoded )
|
testReadFromWithIllegalMessageNum4 ( ) { target = new org . o3project . odenos . core . component . network . topology . PortChanged ( prev , curr , org . o3project . odenos . core . component . network . topology . PortChanged . Action . update ) ; org . msgpack . MessagePack msg = new org . msgpack . MessagePack ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . msgpack . packer . Packer pk = msg . createPacker ( out ) ; byte [ ] bytes ; java . io . ByteArrayInputStream in ; org . msgpack . unpacker . Unpacker upk = null ; try { pk . writeMapBegin ( 4 ) ; pk . write ( "nodeId" ) ; pk . write ( target . nodeId ) ; pk . write ( "version" ) ; pk . write ( target . version ) ; pk . write ( "id" ) ; pk . write ( target . id ) ; pk . write ( "action" ) ; pk . write ( target . action ) ; pk . write ( "prev" ) ; pk . write ( target . prev ) ; pk . write ( "curr" ) ; pk . write ( target . curr ) ; pk . writeMapEnd ( ) ; bytes = out . toByteArray ( ) ; in = new java . io . ByteArrayInputStream ( bytes ) ; upk = msg . createUnpacker ( in ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "Exception<sp>in<sp>test<sp>setup" ) ; } target = org . mockito . Mockito . spy ( new org . o3project . odenos . core . component . network . topology . PortChanged ( ) ) ; try { target . readFrom ( upk ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; return ; } org . junit . Assert . fail ( "could<sp>not<sp>catch<sp>an<sp>exception" ) ; } readFrom ( org . msgpack . unpacker . Unpacker ) { int size = upk . readMapBegin ( ) ; if ( size != ( org . o3project . odenos . remoteobject . event . BaseObjectChanged . MSG_NUM ) ) { throw new java . io . IOException ( ) ; } while ( ( size -- ) > 0 ) { java . lang . String field = upk . readString ( ) ; switch ( field ) { case "action" : action = upk . readString ( ) ; break ; case "prev" : if ( ! ( upk . trySkipNil ( ) ) ) { prev = upk . read ( this . msgClass ) ; } break ; case "curr" : if ( ! ( upk . trySkipNil ( ) ) ) { curr = upk . read ( this . msgClass ) ; } break ; default : throw new java . io . IOException ( ) ; } } upk . readMapEnd ( ) ; }
|
org . junit . Assert . assertTrue ( ( e instanceof java . io . IOException ) )
|
testGitIgnoreRemovePattern ( ) { executeGitIgnoreCreate ( ) ; org . jboss . forge . addon . ui . controller . CommandController gitIgnoreRemovePatternTester = testHarness . createCommandController ( org . jboss . forge . addon . git . ui . GitIgnoreRemovePatternCommand . class , project . getRoot ( ) ) ; gitIgnoreRemovePatternTester . initialize ( ) ; gitIgnoreRemovePatternTester . setValueFor ( "pattern" , ".metadata" ) ; gitIgnoreRemovePatternTester . execute ( ) ; org . jboss . forge . addon . git . gitignore . resources . GitIgnoreResource gitignore = gitIgnoreResource ( ) ; java . lang . String content = org . jboss . forge . furnace . util . Streams . toString ( gitignore . getResourceInputStream ( ) ) ; "<AssertPlaceHolder>" ; } getResourceInputStream ( ) { try { return getFileOperations ( ) . createInputStream ( file ) ; } catch ( java . io . IOException e ) { throw new org . jboss . forge . addon . resource . ResourceException ( ( "cannot<sp>obtain<sp>stream<sp>to<sp>file:<sp>file<sp>does<sp>not<sp>exist:<sp>" + ( file . getAbsolutePath ( ) ) ) ) ; } }
|
org . junit . Assert . assertFalse ( content . contains ( ".metadata" ) )
|
testEqualsDifferentClass ( ) { org . bff . javampd . MPDItem item = new org . bff . javampd . MPDItemTest . TestItem ( "item" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == object ) { return true ; } if ( ( object == null ) || ( ( object . getClass ( ) ) != ( this . getClass ( ) ) ) ) { return false ; } if ( ! ( super . equals ( object ) ) ) { return false ; } org . bff . javampd . album . MPDAlbum album = ( ( org . bff . javampd . album . MPDAlbum ) ( object ) ) ; return ( ( ( this . getName ( ) . equals ( album . getName ( ) ) ) && ( this . getGenre ( ) . equals ( album . getGenre ( ) ) ) ) && ( compareArtists ( album ) ) ) && ( compareDates ( album ) ) ; }
|
org . junit . Assert . assertFalse ( item . equals ( new java . lang . String ( ) ) )
|
shouldFailCheckingRequiredBatchForOtherBatchRequired ( ) { given ( order . getBelongsToField ( OrderFields . TECHNOLOGY ) ) . willReturn ( technology ) ; given ( order . getHasManyField ( "genealogies" ) . isEmpty ( ) ) . willReturn ( true ) ; given ( technology . getBooleanField ( "batchRequired" ) ) . willReturn ( false ) ; given ( technology . getBooleanField ( "shiftFeatureRequired" ) ) . willReturn ( false ) ; given ( technology . getBooleanField ( "postFeatureRequired" ) ) . willReturn ( false ) ; given ( technology . getBooleanField ( "otherFeatureRequired" ) ) . willReturn ( true ) ; boolean result = orderService . checkRequiredBatch ( order ) ; "<AssertPlaceHolder>" ; } checkRequiredBatch ( com . qcadoo . model . api . Entity ) { com . qcadoo . model . api . Entity technology = order . getBelongsToField ( OrderFields . TECHNOLOGY ) ; if ( technology != null ) { if ( order . getHasManyField ( "genealogies" ) . isEmpty ( ) ) { if ( technology . getBooleanField ( "batchRequired" ) ) { return false ; } if ( technology . getBooleanField ( "shiftFeatureRequired" ) ) { return false ; } if ( technology . getBooleanField ( "postFeatureRequired" ) ) { return false ; } if ( technology . getBooleanField ( "otherFeatureRequired" ) ) { return false ; } for ( com . qcadoo . model . api . Entity operationComponent : technology . getTreeField ( TechnologyFields . OPERATION_COMPONENTS ) ) { for ( com . qcadoo . model . api . Entity operationProductComponent : operationComponent . getHasManyField ( TechnologyOperationComponentFields . OPERATION_PRODUCT_IN_COMPONENTS ) ) { if ( operationProductComponent . getBooleanField ( "batchRequired" ) ) { return false ; } } } } for ( com . qcadoo . model . api . Entity genealogy : order . getHasManyField ( "genealogies" ) ) { if ( ( technology . getBooleanField ( "batchRequired" ) ) && ( ( genealogy . getField ( "batch" ) ) == null ) ) { return false ; } if ( technology . getBooleanField ( "shiftFeatureRequired" ) ) { com . qcadoo . mes . orders . List < com . qcadoo . model . api . Entity > entityList = genealogy . getHasManyField ( "shiftFeatures" ) ; if ( entityList . isEmpty ( ) ) { return false ; } } if ( technology . getBooleanField ( "postFeatureRequired" ) ) { com . qcadoo . mes . orders . List < com . qcadoo . model . api . Entity > entityList = genealogy . getHasManyField ( "postFeatures" ) ; if ( entityList . isEmpty ( ) ) { return false ; } } if ( technology . getBooleanField ( "otherFeatureRequired" ) ) { com . qcadoo . mes . orders . List < com . qcadoo . model . api . Entity > entityList = genealogy . getHasManyField ( "otherFeatures" ) ; if ( entityList . isEmpty ( ) ) { return false ; } } for ( com . qcadoo . model . api . Entity genealogyProductIn : genealogy . getHasManyField ( "productInComponents" ) ) { if ( genealogyProductIn . getBelongsToField ( "shiftFeatures" 0 ) . getBooleanField ( "batchRequired" ) ) { com . qcadoo . mes . orders . List < com . qcadoo . model . api . Entity > entityList = genealogyProductIn . getHasManyField ( "batch" ) ; if ( entityList . isEmpty ( ) ) { return false ; } } } } } return true ; }
|
org . junit . Assert . assertFalse ( result )
|
testWithReasonCodes ( ) { java . util . Map < java . lang . String , java . util . List < java . lang . Object > > externalData = new java . util . HashMap ( ) ; java . util . List < java . lang . Object > applicantValues = new java . util . ArrayList ( ) ; org . kie . api . io . Resource resource = org . kie . internal . io . ResourceFactory . newClassPathResource ( "234" 6 ) ; "<AssertPlaceHolder>" ; org . kie . internal . builder . ScoreCardConfiguration scconf = org . kie . internal . builder . KnowledgeBuilderFactory . newScoreCardConfiguration ( ) ; scconf . setUsingExternalTypes ( true ) ; scconf . setWorksheetName ( "scorecards_reasoncode" ) ; resource . setConfiguration ( scconf ) ; resource . setResourceType ( ResourceType . SCARD ) ; org . kie . pmml . pmml_4_2 . PMML4ExecutionHelper helper = org . kie . pmml . pmml_4_2 . PMML4ExecutionHelper . PMML4ExecutionHelperFactory . getExecutionHelper ( "234" 2 , resource , null , false ) ; helper . addExternalDataSource ( "externalBeanApplicant" ) ; helper . addPossiblePackageName ( "org.drools.scorecards.example" ) ; org . drools . scorecards . example . Applicant applicant = new org . drools . scorecards . example . Applicant ( ) ; applicant . setAge ( 10 ) ; applicantValues . add ( applicant ) ; externalData . put ( "externalBeanApplicant" , applicantValues ) ; org . kie . api . pmml . PMMLRequestData request = new org . kie . api . pmml . PMMLRequestData ( "123" , "234" 2 ) ; org . kie . api . pmml . PMML4Result resultHolder = helper . submitRequest ( request , externalData ) ; checkResults ( 129.0 , "VL0099" , java . util . Arrays . asList ( "VL0099" , "234" 4 ) , resultHolder ) ; applicant = new org . drools . scorecards . example . Applicant ( ) ; applicant . setOccupation ( "SKYDIVER" ) ; applicant . setAge ( 0 ) ; applicantValues . clear ( ) ; applicantValues . add ( applicant ) ; request = new org . kie . api . pmml . PMMLRequestData ( "234" , "234" 2 ) ; resultHolder = helper . submitRequest ( request , externalData ) ; checkResults ( 99.0 , "OC0099" , java . util . Arrays . asList ( "OC0099" , "VL0099" , "AGE01" ) , resultHolder ) ; applicant = new org . drools . scorecards . example . Applicant ( ) ; applicant . setResidenceState ( "234" 3 ) ; applicant . setOccupation ( "234" 0 ) ; applicant . setAge ( 20 ) ; applicant . setValidLicense ( true ) ; applicantValues . clear ( ) ; applicantValues . add ( applicant ) ; request = new org . kie . api . pmml . PMMLRequestData ( "234" , "234" 2 ) ; resultHolder = helper . submitRequest ( request , externalData ) ; checkResults ( 141.0 , "RS001" , java . util . Arrays . asList ( "RS001" , "234" 5 , "OC0099" , "234" 1 ) , resultHolder ) ; } newClassPathResource ( java . lang . String ) { return new org . drools . core . io . impl . ClassPathResource ( path ) ; }
|
org . junit . Assert . assertNotNull ( resource )
|
testComputeRoutesWithNextHopIpArpFalseForInterfaceNoNeighbors ( ) { java . lang . String outInterface = "i1" ; org . batfish . datamodel . AbstractRoute nextHopIpRoute1 = org . batfish . datamodel . StaticRoute . builder ( ) . setNetwork ( org . batfish . datamodel . ForwardingAnalysisImplTest . P1 ) . setNextHopIp ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getStartIp ( ) ) . setAdministrativeCost ( 1 ) . build ( ) ; org . batfish . datamodel . AbstractRoute nextHopIpRoute2 = org . batfish . datamodel . StaticRoute . builder ( ) . setNetwork ( org . batfish . datamodel . ForwardingAnalysisImplTest . P1 ) . setNextHopIp ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getEndIp ( ) ) . setAdministrativeCost ( 1 ) . build ( ) ; org . batfish . datamodel . AbstractRoute ifaceRoute = new org . batfish . datamodel . ConnectedRoute ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 , outInterface ) ; java . util . Set < org . batfish . datamodel . AbstractRoute > candidateRoutes = com . google . common . collect . ImmutableSet . of ( nextHopIpRoute1 , nextHopIpRoute2 , ifaceRoute ) ; org . batfish . datamodel . Fib fib = org . batfish . datamodel . MockFib . builder ( ) . setNextHopInterfaces ( com . google . common . collect . ImmutableMap . of ( nextHopIpRoute1 , com . google . common . collect . ImmutableMap . of ( outInterface , com . google . common . collect . ImmutableMap . of ( nextHopIpRoute1 . getNextHopIp ( ) , com . google . common . collect . ImmutableSet . of ( ifaceRoute ) ) ) , nextHopIpRoute2 , com . google . common . collect . ImmutableMap . of ( outInterface , com . google . common . collect . ImmutableMap . of ( nextHopIpRoute2 . getNextHopIp ( ) , com . google . common . collect . ImmutableSet . of ( ifaceRoute ) ) ) , ifaceRoute , com . google . common . collect . ImmutableMap . of ( outInterface , com . google . common . collect . ImmutableMap . of ( Route . UNSET_ROUTE_NEXT_HOP_IP , com . google . common . collect . ImmutableSet . of ( ifaceRoute ) ) ) ) ) . build ( ) ; java . util . Set < org . batfish . datamodel . AbstractRoute > result = org . batfish . datamodel . ForwardingAnalysisImpl . computeRoutesWithNextHopIpArpFalseForInterface ( fib , outInterface , candidateRoutes , com . google . common . collect . ImmutableMap . of ( ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , java . util . SortedSet ) { return new org . batfish . common . Container ( name , testrigs ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( com . google . common . collect . ImmutableSet . of ( nextHopIpRoute1 , nextHopIpRoute2 ) ) )
|
status ( ) { nginxCommandLineInterface . killAll ( ) . thenCompose ( ( nginxResponse ) -> nginxCommandLineInterface . stop ( ) ) . thenCompose ( ( nginxResponse ) -> nginxCommandLineInterface . start ( ) ) . thenCompose ( ( nginxResponse ) -> nginxCommandLineInterface . status ( ) ) . thenAccept ( ( nginxResponse ) -> { if ( nginxResponse . error ( ) ) { com . jslsolucoes . nginx . admin . agent . model . response . NginxExceptionResponse nginxExceptionResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxExceptionResponse ) ( nginxResponse ) ) ; org . junit . Assert . fail ( nginxExceptionResponse . getStackTrace ( ) ) ; } else if ( nginxResponse . forbidden ( ) ) { com . jslsolucoes . nginx . admin . agent . model . response . NginxAuthenticationFailResponse nginxAuthenticationFailResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxAuthenticationFailResponse ) ( nginxResponse ) ) ; org . junit . Assert . fail ( nginxAuthenticationFailResponse . getMessage ( ) ) ; } else { com . jslsolucoes . nginx . admin . agent . model . response . NginxCommandLineInterfaceResponse nginxCommandLineInterfaceResponse = ( ( com . jslsolucoes . nginx . admin . agent . model . response . NginxCommandLineInterfaceResponse ) ( nginxResponse ) ) ; "<AssertPlaceHolder>" ; } } ) . join ( ) ; } getSuccess ( ) { return success ; }
|
org . junit . Assert . assertTrue ( nginxCommandLineInterfaceResponse . getSuccess ( ) )
|
testSetIpv6LocRouterId ( ) { java . util . List list = new java . util . ArrayList ( ) ; ospfLinkTed . setIpv4LocRouterId ( list ) ; "<AssertPlaceHolder>" ; } ipv6LocRouterId ( ) { return ipv6LocRouterId ; }
|
org . junit . Assert . assertThat ( ospfLinkTed . ipv6LocRouterId ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
testAt ( ) { org . arend . typechecking . visitor . CheckTypeVisitor . Result result = typeCheckExpr ( "\\lam<sp>(p<sp>:<sp>suc<sp>=<sp>suc)<sp>=><sp>(p<sp>@<sp>left)<sp>0" , null ) ; "<AssertPlaceHolder>" ; } getType ( ) { return myExpression ; }
|
org . junit . Assert . assertNotNull ( result . expression . getType ( ) )
|
givenAListAndElements_whenUseCollectionsAddAll_thenAddElementsToTargetList ( ) { com . baeldung . list . List < com . baeldung . list . Flower > target = new com . baeldung . list . ArrayList ( ) ; com . baeldung . list . Collections . addAll ( target , flowers . get ( 0 ) , flowers . get ( 1 ) , flowers . get ( 2 ) , flowers . get ( 0 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
|
org . junit . Assert . assertEquals ( target . size ( ) , 4 )
|
testKnownPatternAfter5 ( ) { result = p . match ( "LABEL(A)<sp>AFTER(2)<sp>LABEL(C)" , data ) ; "<AssertPlaceHolder>" ; } size ( ) { return chunkedData . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
|
testNegativeSeek ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . setBoolean ( DFSConfigKeys . DFS_STORE_SMALL_FILES_IN_DB_KEY , true ) ; conf . setLong ( DFSConfigKeys . DFS_DB_FILE_MAX_SIZE_KEY , ( 1024 * 1024 ) ) ; conf . setLong ( DFSConfigKeys . DFS_DB_ONDISK_LARGE_FILE_MAX_SIZE_KEY , ( 1024 * 1024 ) ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . build ( ) ; org . apache . hadoop . fs . FileSystem fs = cluster . getFileSystem ( ) ; try { org . apache . hadoop . fs . Path seekFile = new org . apache . hadoop . fs . Path ( "seekboundaries.dat" ) ; org . apache . hadoop . hdfs . DFSTestUtil . createFile ( fs , seekFile , org . apache . hadoop . hdfs . TestSmallFileSeek . ONEMB , fs . getDefaultReplication ( seekFile ) , org . apache . hadoop . hdfs . TestSmallFileSeek . seed ) ; org . apache . hadoop . fs . FSDataInputStream stream = fs . open ( seekFile ) ; stream . seek ( 65536 ) ; "<AssertPlaceHolder>" ; stream . seek ( ( - 73 ) ) ; } finally { fs . close ( ) ; cluster . shutdown ( ) ; } } getPos ( ) { return currentPos ; }
|
org . junit . Assert . assertEquals ( 65536 , stream . getPos ( ) )
|
insertUpdateLoadColumnOneToManyOwner ( ) { org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyOwner owner = new org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyOwner ( 10 ) ; insert ( owner ) ; org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyInverse inverse = new org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyInverse ( 9 ) ; insert ( inverse ) ; javax . persistence . EntityManager em = factory . createEntityManager ( ) ; inverse = em . find ( org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyInverse . class , 9 ) ; owner = em . find ( org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyOwner . class , 10 ) ; em . close ( ) ; owner . setInverses ( java . util . Arrays . asList ( inverse ) ) ; mergeAndCommit ( inverse ) ; mergeAndCommit ( owner ) ; em = factory . createEntityManager ( ) ; owner = em . find ( org . meri . jpa . relationships . entities . onetomany . ColumnOneToManyOwner . class , 10 ) ; "<AssertPlaceHolder>" ; em . close ( ) ; } getInverses ( ) { return inverses ; }
|
org . junit . Assert . assertEquals ( 0 , owner . getInverses ( ) . size ( ) )
|
test_GetPasswordEditBox_By_Name ( ) { mmarquee . automation . BaseAutomationTest . setElementClassName ( elem , "PasswordBox" ) ; mmarquee . automation . BaseAutomationTest . setElementCurrentName ( elem , "myName" ) ; when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationPasswordEditBox box = spyWndw . getPasswordEditBox ( mmarquee . automation . controls . Search . getBuilder ( "myName" ) . build ( ) ) ; "<AssertPlaceHolder>" ; verify ( spyWndw ) . createNamePropertyCondition ( "myName" ) ; verify ( spyWndw ) . createControlTypeCondition ( ControlType . Edit ) ; verify ( element , atLeastOnce ( ) ) . findFirst ( any ( ) , any ( ) ) ; } getElement ( ) { return this . element ; }
|
org . junit . Assert . assertEquals ( targetElement , box . getElement ( ) )
|
testEqualsSuperFalse ( ) { org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionSetField obj = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionSetField ( ) ; doReturn ( "false" ) . when ( target ) . getType ( ) ; boolean result = target . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . o3project . odenos . remoteobject . event . EventSubscription ) ) { return false ; } org . o3project . odenos . remoteobject . event . EventSubscription eventSubscription = ( ( org . o3project . odenos . remoteobject . event . EventSubscription ) ( obj ) ) ; return this . subscriberId . equals ( eventSubscription . getSubscriberId ( ) ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) )
|
composeBitmapOfZerosAndOnesWithBitmapOfOnes ( ) { com . googlecode . javaewah . EWAHCompressedBitmap bitmap1 = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( ) ; bitmap1 . setSizeInBits ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS , false ) ; bitmap1 . setSizeInBits ( ( 2 * ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS ) ) , true ) ; com . googlecode . javaewah . EWAHCompressedBitmap bitmap2 = com . googlecode . javaewah . EWAHCompressedBitmap . bitmapOf ( ) ; bitmap2 . setSizeInBits ( com . googlecode . javaewah . EWAHCompressedBitmap . WORD_IN_BITS , true ) ; com . googlecode . javaewah . EWAHCompressedBitmap result = bitmap1 . compose ( bitmap2 ) ; "<AssertPlaceHolder>" ; } compose ( com . googlecode . javaewah . EWAHCompressedBitmap ) { int size = this . buffer . sizeInWords ( ) ; final com . googlecode . javaewah . EWAHCompressedBitmap container = new com . googlecode . javaewah . EWAHCompressedBitmap ( size ) ; composeToContainer ( a , container ) ; return container ; }
|
org . junit . Assert . assertEquals ( bitmap1 , result )
|
testReadRestrictions ( ) { org . apache . jackrabbit . oak . util . NodeUtil aceNode = new org . apache . jackrabbit . oak . util . NodeUtil ( root . getTree ( "val1" 1 ) ) . addChild ( "test" , org . apache . jackrabbit . oak . spi . security . authorization . restriction . NT_REP_GRANT_ACE ) ; aceNode . setBoolean ( "val1" 2 , true ) ; aceNode . setValues ( "longs" , new javax . jcr . Value [ ] { vf . createValue ( 10 ) , vf . createValue ( 290 ) } ) ; aceNode . setString ( org . apache . jackrabbit . oak . spi . security . authorization . restriction . REP_GLOB , "*" ) ; aceNode . setNames ( org . apache . jackrabbit . oak . spi . security . authorization . restriction . REP_NT_NAMES ) ; aceNode . setString ( "invalid" , "val" ) ; aceNode . setStrings ( "invalid2" , "val1" , "val2" , "val1" 0 ) ; java . util . Set < org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction > restrictions = provider . readRestrictions ( "/test" , aceNode . getTree ( ) ) ; "<AssertPlaceHolder>" ; for ( org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction r : restrictions ) { java . lang . String name = r . getDefinition ( ) . getName ( ) ; if ( ! ( supported . contains ( name ) ) ) { org . junit . Assert . fail ( "read<sp>unsupported<sp>restriction" ) ; } } } size ( ) { return ps . size ( ) ; }
|
org . junit . Assert . assertEquals ( 4 , restrictions . size ( ) )
|
isOrNotLikeWithLowerCaseWorking ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>lower(r.stringAttribute)<sp>not<sp>like<sp>'%a<sp>string<sp>01%'<sp>or<sp>lower(r.stringAttribute)<sp>not<sp>like<sp>'%a<sp>string<sp>02%'" ; final java . util . List < com . uaihebert . model . test . RegularEntityOne > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityOne . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityOne > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityOne . class ) ; uaiCriteria . orStringNotLike ( true , "stringAttribute" , "%a<sp>string<sp>01%" ) . orStringNotLike ( true , "stringAttribute" , "%a<sp>string<sp>02%" ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
|
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 2 ) )
|
cleanupFailedNodesNotEmpty ( ) { java . util . Map < org . jclouds . compute . domain . NodeMetadata , java . lang . Throwable > failedNodes = new java . util . HashMap ( ) ; java . lang . Throwable exception = mock ( java . lang . Throwable . class ) ; org . jclouds . compute . domain . NodeMetadata meta = mock ( org . jclouds . compute . domain . NodeMetadata . class ) ; failedNodes . put ( meta , exception ) ; java . util . Set < org . jclouds . compute . domain . NodeMetadata > destroyedNodes = new java . util . HashSet ( ) ; destroyedNodes . add ( meta ) ; when ( meta . getId ( ) ) . thenReturn ( "20" ) ; doReturn ( destroyedNodes ) . when ( novaComputeService ) . destroyNodesMatching ( com . google . common . base . Predicates . in ( failedNodes . keySet ( ) ) ) ; se . kth . karamel . backend . launcher . nova . NovaLauncher novaLauncher = new se . kth . karamel . backend . launcher . nova . NovaLauncher ( novaContext , sshKeyPair ) ; boolean cleanupSuccessful = novaLauncher . cleanupFailedNodes ( failedNodes ) ; "<AssertPlaceHolder>" ; } cleanupFailedNodes ( java . util . Map ) { boolean success = false ; return success ; }
|
org . junit . Assert . assertTrue ( cleanupSuccessful )
|
testOnRtcpSent ( ) { org . restcomm . media . core . rtp . statistics . RtpStatistics stats = new org . restcomm . media . core . rtp . statistics . RtpStatistics ( rtpClock , SSRC , CNAME ) ; org . restcomm . media . core . rtcp . RtcpPacket p1 = org . restcomm . media . core . rtcp . RtcpPacketFactory . buildReport ( stats ) ; org . restcomm . media . core . rtcp . RtcpPacket p2 = org . restcomm . media . core . rtcp . RtcpPacketFactory . buildReport ( stats ) ; double initialAvgSize = stats . getRtcpAvgSize ( ) ; p1 . encode ( new byte [ org . restcomm . media . core . rtp . RtpPacket . RTP_PACKET_MAX_SIZE ] , 0 ) ; p2 . encode ( new byte [ org . restcomm . media . core . rtp . RtpPacket . RTP_PACKET_MAX_SIZE ] , 0 ) ; stats . onRtcpSent ( p1 ) ; wallClock . tick ( 20000000L ) ; stats . onRtcpSent ( p2 ) ; double avgSize = calculateAvgSize ( initialAvgSize , p1 . getSize ( ) , p2 . getSize ( ) ) ; "<AssertPlaceHolder>" ; } getRtcpAvgSize ( ) { return rtcpAvgSize ; }
|
org . junit . Assert . assertEquals ( avgSize , stats . getRtcpAvgSize ( ) , 0 )
|
shouldReplaceArgument ( ) { com . oracle . bedrock . OptionsByType optionsByType = com . oracle . bedrock . OptionsByType . empty ( ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A1" , "A1" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A2" , "A21" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A2" , "A22" ) ) ; optionsByType . add ( com . oracle . bedrock . runtime . options . Argument . of ( "A3" , "A3" ) ) ; com . oracle . bedrock . runtime . options . Arguments arguments = optionsByType . get ( com . oracle . bedrock . runtime . options . Arguments . class ) . replace ( "A2" , "changed" ) ; "<AssertPlaceHolder>" ; } resolve ( com . oracle . bedrock . runtime . Platform , com . oracle . bedrock . OptionsByType ) { com . oracle . bedrock . lang . ExpressionEvaluator evaluator = new com . oracle . bedrock . lang . ExpressionEvaluator ( optionsByType ) ; java . util . Properties properties = new java . util . Properties ( ) ; for ( com . oracle . bedrock . runtime . java . options . SystemProperty property : this . properties . values ( ) ) { java . lang . String name = property . getName ( ) ; java . lang . Object value = property . getValue ( ) ; if ( value != null ) { if ( value instanceof com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue ) { com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue contextSensitiveValue = ( ( com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue ) ( value ) ) ; value = contextSensitiveValue . resolve ( name , platform , optionsByType ) ; } if ( value instanceof java . util . Iterator < ? > ) { java . util . Iterator < ? > iterator = ( ( java . util . Iterator < ? > ) ( value ) ) ; if ( iterator . hasNext ( ) ) { value = iterator . next ( ) . toString ( ) ; } else { throw new java . lang . IndexOutOfBoundsException ( java . lang . String . format ( "No<sp>more<sp>values<sp>available<sp>for<sp>the<sp>property<sp>[%s]" , name ) ) ; } } if ( value != null ) { java . lang . String expression = value . toString ( ) . trim ( ) ; if ( ! ( expression . isEmpty ( ) ) ) { java . lang . Object result = evaluator . evaluate ( expression , java . lang . Object . class ) ; expression = ( result == null ) ? "" : result . toString ( ) ; } com . oracle . bedrock . OptionsByType propertyOptions = property . getOptions ( ) ; java . lang . Iterable < com . oracle . bedrock . runtime . java . options . SystemProperty . ResolveHandler > handlers = propertyOptions . getInstancesOf ( SystemProperty . ResolveHandler . class ) ; for ( com . oracle . bedrock . runtime . java . options . SystemProperty . ResolveHandler handler : handlers ) { try { handler . onResolve ( name , expression , optionsByType ) ; } catch ( java . lang . Throwable t ) { t . printStackTrace ( ) ; } } properties . put ( name , expression ) ; } } } return properties ; }
|
org . junit . Assert . assertThat ( arguments . resolve ( null , null ) , contains ( "A1" , "A1" , "A2" , "changed" , "A2" , "A22" , "A3" , "A3" ) )
|
testGetInvalidValue ( ) { "<AssertPlaceHolder>" ; } get ( int ) { int distance = this . distance . get ( nodeId ) ; return distance == ( Integer . MAX_VALUE ) ? Double . POSITIVE_INFINITY : distance / ( multiplier ) ; }
|
org . junit . Assert . assertFalse ( set . get ( ( - 1 ) ) )
|
testGetInstance_IChemObjectBuilder ( ) { org . openscience . cdk . config . AtomTypeFactory atf = org . openscience . cdk . config . AtomTypeFactory . getInstance ( new org . openscience . cdk . ChemObject ( ) . getBuilder ( ) ) ; "<AssertPlaceHolder>" ; } getBuilder ( ) { return null ; }
|
org . junit . Assert . assertNotNull ( atf )
|
testNederlandseNationaliteitBronKoninklijkBesluitTeKortIngezetene ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby0158 . voerRegelUit ( bouwHuidigeSituatieIngezetene ( dagDeg ( 2010 , 2012 ) ) , bouwNieuweSituatie ( NationaliteitcodeAttribuut . NL_NATIONALITEIT_CODE ) , bouwActie ( ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , overtreders . size ( ) )
|
testConverstion ( ) { org . teiid . translator . infinispan . hotrod . SchemaToProtobufProcessor tool = new org . teiid . translator . infinispan . hotrod . SchemaToProtobufProcessor ( ) ; org . teiid . metadata . MetadataFactory mf = org . teiid . translator . infinispan . hotrod . TestProtobufMetadataProcessor . protoMatadata ( "/*<sp>@Indexed<sp>*/\n" 5 ) ; org . teiid . infinispan . api . InfinispanConnection conn = org . mockito . Mockito . mock ( org . teiid . infinispan . api . InfinispanConnection . class ) ; org . infinispan . commons . api . BasicCache cache = org . mockito . Mockito . mock ( org . infinispan . commons . api . BasicCache . class ) ; org . mockito . Mockito . stub ( cache . getName ( ) ) . toReturn ( "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 8 ) ; org . mockito . Mockito . stub ( conn . getCache ( ) ) . toReturn ( cache ) ; org . teiid . infinispan . api . ProtobufResource resource = tool . process ( mf , conn ) ; java . lang . String expected = "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 7 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 4 + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 0 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 9 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 5 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 9 ) + "<sp>/*<sp>@IndexedField<sp>*/\n" ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 8 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 3 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 3 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 5 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 6 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 3 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 4 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 1 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 6 ) + "/*<sp>@Indexed<sp>*/\n" 4 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 9 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 8 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 9 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" ) + "/*<sp>@Indexed<sp>*/\n" 9 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 1 ) + "<sp>optional<sp>fixed64<sp>e6<sp>=<sp>8;\n" ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 3 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 3 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 4 ) + "/*<sp>@Indexed<sp>*/\n" ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 6 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 9 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 8 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 3 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 4 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 1 ) + "/*<sp>@Indexed<sp>*/\n" 0 ) + "/*<sp>@Indexed<sp>*/\n" 4 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 9 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 8 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 4 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 5 ) + "/*<sp>@Indexed<sp>*/\n" 3 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 0 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 0 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 2 ) + "/*<sp>@Indexed<sp>*/\n" 8 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 1 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 7 ) + "<sp>/*<sp>@Teiid(type=bigdecimal)<sp>*/\n" ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 5 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 0 ) + "/*<sp>@Indexed<sp>*/\n" 1 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 7 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 4 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 2 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 8 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 1 ) + "/*<sp>@Indexed<sp>*/\n" 2 ) + "<sp>/*<sp>@Teiid(type=blob)<sp>*/\n" ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 4 ) + "<sp>/*<sp>@Teiid(type=clob)<sp>*/\n" ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 7 ) + "/*<sp>@Indexed<sp>*/\n" 7 ) + "/*<sp>@Indexed<sp>*/\n" 6 ) + "<sp>optional<sp>string<sp>e9<sp>=<sp>9;\n" 2 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 2 ) + "<sp>/*<sp>@IndexedField(index=false)<sp>*/\n" 3 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 4 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 8 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 9 ) + "<sp>optional<sp>int32<sp>e1<sp>=<sp>3;\n" 8 ) + "<sp>/*<sp>@Teiid(type=date)<sp>*/\n" 6 ) ; "<AssertPlaceHolder>" ; } getContents ( ) { return contents ; }
|
org . junit . Assert . assertEquals ( expected , resource . getContents ( ) )
|
initialize_A$ClassMeta$String ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; org . junithelper . core . extractor . ConstructorMetaExtractor target = new org . junithelper . core . extractor . ConstructorMetaExtractor ( config ) ; org . junithelper . core . meta . ClassMeta classMeta = mock ( org . junithelper . core . meta . ClassMeta . class ) ; java . lang . String sourceCodeString = "package<sp>hoge;<sp>public<sp>class<sp>Sample<sp>{<sp>public<sp>void<sp>doSomething(String<sp>str)<sp>{}<sp>}" ; org . junithelper . core . extractor . ConstructorMetaExtractor actual = target . initialize ( classMeta , sourceCodeString ) ; org . junithelper . core . extractor . ConstructorMetaExtractor expected = target ; "<AssertPlaceHolder>" ; } initialize ( org . junithelper . core . meta . ClassMeta , java . lang . String ) { if ( classMeta == null ) { this . classMeta = new org . junithelper . core . extractor . ClassMetaExtractor ( config ) . extract ( sourceCodeString ) ; } else { this . classMeta = classMeta ; } return this ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
shouldParseMutationUnitSize ( ) { final org . pitest . mutationtest . config . ReportOptions actual = parseAddingRequiredArgs ( "--mutationUnitSize" , "50" ) ; "<AssertPlaceHolder>" ; } getMutationUnitSize ( ) { return this . mutationUnitSize ; }
|
org . junit . Assert . assertEquals ( 50 , actual . getMutationUnitSize ( ) )
|
testNoFunctionImport ( ) { org . apache . olingo . odata2 . jpa . processor . core . model . JPAEdmFunctionImportTest . VARIANT = 99 ; build ( ) ; java . util . List < org . apache . olingo . odata2 . api . edm . provider . FunctionImport > functionImportList = jpaEdmfunctionImport . getConsistentFunctionImportList ( ) ; "<AssertPlaceHolder>" ; } getConsistentFunctionImportList ( ) { return consistentFunctionImportList ; }
|
org . junit . Assert . assertEquals ( functionImportList . size ( ) , 0 )
|
testGetNumberOfFilesWithSubDirectory ( ) { java . net . URI directory = org . kitodo . production . services . file . FileServiceTest . fileService . createDirectory ( java . net . URI . create ( "fileServiceTest" ) , "countFiles1" ) ; org . kitodo . production . services . file . FileServiceTest . fileService . createResource ( directory , "test.pdf" ) ; java . net . URI subDirectory = org . kitodo . production . services . file . FileServiceTest . fileService . createDirectory ( directory , "subdirectory" ) ; org . kitodo . production . services . file . FileServiceTest . fileService . createResource ( subDirectory , "subTest.xml" ) ; org . kitodo . production . services . file . FileServiceTest . fileService . createResource ( subDirectory , "subTest2.jpg" ) ; int numberOfFiles = org . kitodo . production . services . file . FileServiceTest . fileService . getNumberOfFiles ( directory ) ; "<AssertPlaceHolder>" ; } getNumberOfFiles ( java . net . URI ) { return fileManagementModule . getNumberOfFiles ( null , directory ) ; }
|
org . junit . Assert . assertEquals ( 3 , numberOfFiles )
|
testPreimageAndProof_SingleFunction ( ) { ch . bfh . unicrypt . math . algebra . multiplicative . classes . GStarMod G_q = this . G_q2 ; ch . bfh . unicrypt . math . algebra . dualistic . classes . ZMod Z_q = this . G_q2 . getZModOrder ( ) ; ch . bfh . unicrypt . math . function . interfaces . Function f1 = ch . bfh . unicrypt . math . function . classes . GeneratorFunction . getInstance ( G_q . getElement ( 2 ) ) ; ch . bfh . unicrypt . math . function . classes . ProductFunction f = ch . bfh . unicrypt . math . function . classes . ProductFunction . getInstance ( f1 ) ; ch . bfh . unicrypt . crypto . proofsystem . challengegenerator . interfaces . SigmaChallengeGenerator scg = ch . bfh . unicrypt . crypto . proofsystem . challengegenerator . classes . FiatShamirSigmaChallengeGenerator . getInstance ( f , this . proverId ) ; ch . bfh . unicrypt . crypto . proofsystem . classes . AndPreimageProofSystem pg = ch . bfh . unicrypt . crypto . proofsystem . classes . AndPreimageProofSystem . getInstance ( scg , f1 , 1 ) ; ch . bfh . unicrypt . math . algebra . general . interfaces . Element privateInput = ch . bfh . unicrypt . math . algebra . general . classes . Tuple . getInstance ( Z_q . getElement ( 2 ) ) ; ch . bfh . unicrypt . math . algebra . general . interfaces . Element publicInput = ch . bfh . unicrypt . math . algebra . general . classes . Tuple . getInstance ( G_q . getElement ( 4 ) ) ; ch . bfh . unicrypt . math . algebra . general . classes . Triple proof = pg . generate ( privateInput , publicInput ) ; boolean v = pg . verify ( proof , publicInput ) ; "<AssertPlaceHolder>" ; } verify ( ch . bfh . unicrypt . math . algebra . general . interfaces . Element , ch . bfh . unicrypt . math . algebra . general . interfaces . Element ) { if ( ( ! ( this . getProofSpace ( ) . contains ( proof ) ) ) || ( ! ( this . getPublicInputSpace ( ) . contains ( publicInput ) ) ) ) { throw new java . lang . IllegalArgumentException ( ) ; } return this . abstractVerify ( ( ( PE ) ( proof ) ) , ( ( PUE ) ( publicInput ) ) ) ; }
|
org . junit . Assert . assertTrue ( v )
|
valideGeefDetailsPersoonHistorievormMaterieelFormeel ( ) { final nl . bzk . brp . model . internbericht . ProtocolleringOpdracht protocolleringOpdracht = maakProtocolleringOpdracht ( SoortDienst . GEEF_DETAILS_PERSOON , null , null , datumEindeMaterielePeriode , null , datumTijdEindeFormelePeriode , Historievorm . MATERIEEL_FORMEEL ) ; "<AssertPlaceHolder>" ; } isValide ( ) { boolean resultaat ; if ( ( levering ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "Levering<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( ( personen ) == null ) || ( personen . isEmpty ( ) ) ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "Personen<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( levering . getToegangLeveringsautorisatieId ( ) ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "ToegangAbonnementId<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( levering . getDienstId ( ) ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "DienstId<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( ( levering . getDatumTijdKlaarzettenLevering ( ) ) == null ) || ( levering . getDatumTijdKlaarzettenLevering ( ) . heeftGeenWaarde ( ) ) ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "DatumTijdKlaarzettenLevering<sp>dient<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( getSoortDienst ( ) ) == null ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "Soort<sp>dienst<sp>gevuld<sp>te<sp>zijn." ) ; } else if ( ( nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . SOORTDIENSTEN_MET_SOORT_SYNCHRONISATIE_VERPLICHT . contains ( getSoortDienst ( ) ) ) && ( ( ( levering . getSoortSynchronisatie ( ) ) == null ) || ( levering . getSoortSynchronisatie ( ) . heeftGeenWaarde ( ) ) ) ) { resultaat = false ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( "ToegangAbonnementId<sp>dient<sp>gevuld<sp>te<sp>zijn." 0 , getSoortDienst ( ) ) ; } else { switch ( soortDienst ) { case ATTENDERING : case MUTATIELEVERING_OP_BASIS_VAN_DOELBINDING : resultaat = isValideAttenderingOfMutatieLeveringDoelbinding ( ) ; break ; case GEEF_DETAILS_PERSOON : case GEEF_DETAILS_PERSOON_BULK : resultaat = isValideGeefDetailsPersoon ( getHistorievorm ( ) ) ; break ; case MUTATIELEVERING_OP_BASIS_VAN_AFNEMERINDICATIE : case PLAATSEN_AFNEMERINDICATIE : case VERWIJDEREN_AFNEMERINDICATIE : resultaat = isValideAfnemerindicatie ( ) ; break ; case SYNCHRONISATIE_PERSOON : resultaat = isValideSynchronisatiePersoon ( ) ; break ; case GEEF_MEDEBEWONERS_VAN_PERSOON : resultaat = isValideGeefMedebewonersVanPersoon ( ) ; break ; default : final java . lang . String foutmelding = "Voor<sp>deze<sp>catalogusoptie<sp>is<sp>geen<sp>protocollering<sp>validatie<sp>ingesteld:<sp>" + ( soortDienst ) ; nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . error ( foutmelding ) ; throw new java . lang . IllegalArgumentException ( foutmelding ) ; } if ( ! resultaat ) { nl . bzk . brp . model . internbericht . ProtocolleringOpdracht . LOGGER . debug ( ( "De<sp>protocollering<sp>is<sp>niet<sp>valide<sp>voor<sp>de<sp>catalogusoptie:<sp>{},<sp>" + ( ( "datum<sp>materieel<sp>selectie:<sp>{},<sp>datum<sp>aanvang<sp>materiele<sp>periode:<sp>{},<sp>" + "datum<sp>einde<sp>materiele<sp>periode:<sp>{},<sp>datum<sp>tijd<sp>aanv<sp>form<sp>periode:<sp>{},<sp>" ) + "ToegangAbonnementId<sp>dient<sp>gevuld<sp>te<sp>zijn." 1 ) ) , soortDienst , levering . getDatumMaterieelSelectie ( ) , levering . getDatumAanvangMaterielePeriodeResultaat ( ) , levering . getDatumEindeMaterielePeriodeResultaat ( ) , levering . getDatumTijdAanvangFormelePeriodeResultaat ( ) , levering . getDatumTijdEindeFormelePeriodeResultaat ( ) , historievorm ) ; } } return resultaat ; }
|
org . junit . Assert . assertTrue ( protocolleringOpdracht . isValide ( ) )
|
getPartNumber ( ) { "<AssertPlaceHolder>" ; } getPartNumber ( ) { org . junit . Assert . assertNotNull ( org . eclipse . kura . core . system . test . SystemServiceTest . systemService . getPartNumber ( ) ) ; }
|
org . junit . Assert . assertNotNull ( org . eclipse . kura . core . system . test . SystemServiceTest . systemService . getPartNumber ( ) )
|
canUnwrapAWildcardedOptionalToDetermineBaseType ( ) { @ com . facebook . buck . util . SuppressWarnings ( "unused" ) class Contained { public java . util . Optional < ? extends java . util . Calendar > field ; } java . lang . reflect . Field field = Contained . class . getField ( "field" ) ; java . lang . reflect . Type baseType = com . facebook . buck . util . Types . getBaseType ( field ) ; "<AssertPlaceHolder>" ; } getBaseType ( java . lang . reflect . Field ) { java . lang . reflect . Type type = com . facebook . buck . util . Types . getFirstNonOptionalType ( field ) ; if ( type instanceof java . lang . reflect . ParameterizedType ) { type = ( ( java . lang . reflect . ParameterizedType ) ( type ) ) . getActualTypeArguments ( ) [ 0 ] ; } if ( type instanceof java . lang . reflect . WildcardType ) { type = ( ( java . lang . reflect . WildcardType ) ( type ) ) . getUpperBounds ( ) [ 0 ] ; } return com . google . common . primitives . Primitives . wrap ( ( ( java . lang . Class < ? > ) ( type ) ) ) ; }
|
org . junit . Assert . assertEquals ( java . util . Calendar . class , baseType )
|
executeDockedNode ( ) { this . tested = new org . kie . workbench . common . stunner . core . client . canvas . command . MorphCanvasNodeCommand ( graphInstance . dockedNode , morphDefinition , org . kie . workbench . common . stunner . core . client . canvas . command . MorphCanvasNodeCommandTest . NEW_SHAPE_SET_ID ) ; org . kie . workbench . common . stunner . core . command . CommandResult < org . kie . workbench . common . stunner . core . client . command . CanvasViolation > result = tested . execute ( canvasHandler ) ; "<AssertPlaceHolder>" ; verify ( canvasHandler ) . deregister ( graphInstance . dockedNode ) ; verify ( canvasHandler ) . register ( org . kie . workbench . common . stunner . core . client . canvas . command . MorphCanvasNodeCommandTest . NEW_SHAPE_SET_ID , graphInstance . dockedNode ) ; verify ( canvasHandler ) . applyElementMutation ( graphInstance . dockedNode , MutationContext . STATIC ) ; verify ( canvasHandler ) . undock ( graphInstance . intermNode , graphInstance . dockedNode ) ; verify ( canvasHandler ) . dock ( graphInstance . intermNode , graphInstance . dockedNode ) ; } isError ( org . kie . workbench . common . stunner . core . command . CommandResult ) { return org . kie . workbench . common . stunner . core . command . util . CommandUtils . isCommandResultError ( result ) ; }
|
org . junit . Assert . assertFalse ( org . kie . workbench . common . stunner . core . command . util . CommandUtils . isError ( result ) )
|
deserialize_from_string_correct_output_from_mapper ( ) { when ( mockMapper . readValue ( "foo" , com . amazon . ask . model . RequestEnvelope . class ) ) . thenReturn ( requestEnvelope ) ; "<AssertPlaceHolder>" ; } deserialize ( java . io . InputStream , java . lang . Class ) { try { return com . amazon . ask . util . JacksonSerializer . mapper . readValue ( inputStream , type ) ; } catch ( java . io . IOException e ) { throw new com . amazon . ask . exception . AskSdkException ( "Deserialization<sp>error" , e ) ; } }
|
org . junit . Assert . assertEquals ( serializer . deserialize ( "foo" , com . amazon . ask . model . RequestEnvelope . class ) , requestEnvelope )
|
testDeleteAsyncFalse ( ) { initializeExpectedSink ( 1 ) ; expect ( logging . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( logging . deleteSinkAsync ( com . google . cloud . logging . SinkTest . NAME ) ) . andReturn ( com . google . api . core . ApiFutures . immediateFuture ( false ) ) ; replay ( logging ) ; initializeSink ( ) ; "<AssertPlaceHolder>" ; } deleteAsync ( ) { java . util . concurrent . Future < java . lang . Boolean > future = sink . deleteAsync ( ) ; boolean deleted = future . get ( ) ; if ( deleted ) { } else { } return deleted ; }
|
org . junit . Assert . assertFalse ( sink . deleteAsync ( ) . get ( ) )
|
test_any_stream ( ) { org . omg . CORBA . Any testValue = setup . getClientOrb ( ) . create_any ( ) ; testValue . insert_wstring ( "hello<sp>world" ) ; org . omg . CORBA . Any any = setup . getClientOrb ( ) . create_any ( ) ; any . type ( setup . getClientOrb ( ) . get_primitive_tc ( TCKind . tk_any ) ) ; any . create_output_stream ( ) . write_any ( testValue ) ; org . omg . CORBA . Any outValue = any . extract_any ( ) ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
|
org . junit . Assert . assertTrue ( outValue . equal ( testValue ) )
|
testSerialization ( ) { org . jfree . chart . renderer . category . GanttRenderer r1 = new org . jfree . chart . renderer . category . GanttRenderer ( ) ; r1 . setCompletePaint ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . RED , 3.0F , 4.0F , java . awt . Color . BLUE ) ) ; r1 . setIncompletePaint ( new java . awt . GradientPaint ( 4.0F , 3.0F , java . awt . Color . RED , 2.0F , 1.0F , java . awt . Color . BLUE ) ) ; org . jfree . chart . renderer . category . GanttRenderer r2 = ( ( org . jfree . chart . renderer . category . GanttRenderer ) ( org . jfree . chart . TestUtils . serialised ( r1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( r1 , r2 )
|
shouldGetANCRegisterForANCOutOfAreaWithoutDOB ( ) { org . ei . drishti . common . util . DateUtil . fakeIt ( org . joda . time . LocalDate . parse ( "householdAddress" 5 ) ) ; org . ei . drishti . domain . Mother mother = new org . ei . drishti . domain . Mother ( "thayi<sp>card<sp>number<sp>1" 4 , "householdAddress" 3 , "thayi<sp>card<sp>number<sp>1" ) . withLMP ( org . joda . time . LocalDate . parse ( "thayi<sp>card<sp>number<sp>1" 9 ) ) . withDetails ( create ( "o<sp>-ve" 1 , "thayi<sp>card<sp>number<sp>1" 5 ) . put ( "thayi<sp>card<sp>number<sp>1" 8 , "householdAddress" 5 ) . put ( "150" 2 , "phone<sp>1" 5 ) . put ( "householdAddress" 2 , "150" 6 ) . put ( "o<sp>-ve" 2 , "150" ) . put ( "householdAddress" 6 , "o<sp>-ve" ) . put ( "householdAddress" 0 , "phone<sp>1" 5 ) . map ( ) ) ; org . ei . drishti . domain . EligibleCouple eligibleCouple = new org . ei . drishti . domain . EligibleCouple ( "householdAddress" 3 , "phone<sp>1" 3 ) . withDetails ( create ( "aadharNumber" , "150" 3 ) . put ( "householdAddress" , "150" 7 ) . put ( "150" 4 , "phone<sp>1" ) . put ( "householdAddress" 8 , "150" 0 ) . put ( "150" 9 , "householdAddress" 1 ) . put ( "thayi<sp>card<sp>number<sp>1" 0 , "phone<sp>1" 6 ) . put ( "thayi<sp>card<sp>number<sp>1" 1 , "phone<sp>1" 7 ) . put ( "phone<sp>1" 4 , "150" 1 ) . put ( "phone<sp>1" 0 , "thayi<sp>card<sp>number<sp>1" 3 ) . put ( "thayi<sp>card<sp>number<sp>1" 6 , "householdAddress" 9 ) . put ( "phone<sp>1" 9 , "2" ) . put ( "o<sp>-ve" 0 , "householdAddress" 7 ) . put ( "householdAddress" 4 , "150" 8 ) . put ( "phone<sp>1" 1 , "5" ) . put ( "150" 5 , "thayi<sp>card<sp>number<sp>1" 7 ) . put ( "phone<sp>1" 8 , "o<sp>-ve" 3 ) . map ( ) ) . withCouple ( "phone<sp>1" 2 , "name2" ) ; when ( allMothers . findAllOpenMothersForANM ( "thayi<sp>card<sp>number<sp>1" 2 ) ) . thenReturn ( asList ( mother ) ) ; when ( allEligibleCouples . findAll ( asList ( "householdAddress" 3 ) ) ) . thenReturn ( asList ( eligibleCouple ) ) ; org . ei . drishti . domain . register . ANCRegister expectedRegister = new org . ei . drishti . domain . register . ANCRegister ( asList ( new org . ei . drishti . domain . register . ANCRegisterEntry ( ) . withANCNumber ( "thayi<sp>card<sp>number<sp>1" 5 ) . withRegistrationDate ( "householdAddress" 5 ) . withECNumber ( "phone<sp>1" 3 ) . withThayiCardNumber ( "thayi<sp>card<sp>number<sp>1" ) . withAadharCardNumber ( "150" 3 ) . withWifeName ( "phone<sp>1" 2 ) . withHusbandName ( "name2" ) . withAddress ( "150" 7 ) . withWifeDOB ( "1988-01-01" ) . withPhoneNumber ( "phone<sp>1" ) . withWifeEducationLevel ( "150" 0 ) . withHusbandEducationLevel ( "householdAddress" 1 ) . withCaste ( "phone<sp>1" 6 ) . withReligion ( "phone<sp>1" 7 ) . withEconomicStatus ( "150" 1 ) . withBPLCardNumber ( "thayi<sp>card<sp>number<sp>1" 3 ) . withJSYBeneficiary ( "phone<sp>1" 5 ) . withGravida ( "householdAddress" 9 ) . withParity ( "2" ) . withNumberOfLivingChildren ( "householdAddress" 7 ) . withNumberOfStillBirths ( "150" 8 ) . withNumberOfAbortions ( "5" ) . withYoungestChildDOB ( "thayi<sp>card<sp>number<sp>1" 7 ) . withLMP ( "thayi<sp>card<sp>number<sp>1" 9 ) . withEDD ( "150" 6 ) . withHeight ( "150" ) . withBloodGroup ( "o<sp>-ve" ) . withIsHRP ( "phone<sp>1" 5 ) ) ) ; org . ei . drishti . domain . register . ANCRegister register = registerService . getRegisterForANM ( "thayi<sp>card<sp>number<sp>1" 2 ) ; "<AssertPlaceHolder>" ; } getRegisterForANM ( java . lang . String ) { java . util . ArrayList < org . ei . drishti . domain . register . ChildRegisterEntry > childRegisterEntries = new java . util . ArrayList ( ) ; java . util . List < org . ei . drishti . domain . Child > children = allChildren . findAllOpenChildrenForANM ( anmIdentifier ) ; java . util . Collection < java . lang . String > motherIds = selectDistinct ( collect ( children , on ( org . ei . drishti . domain . Child . class ) . motherCaseId ( ) ) ) ; java . util . List < java . lang . String > motherIdsList = new java . util . ArrayList ( ) ; motherIdsList . addAll ( motherIds ) ; java . util . List < org . ei . drishti . domain . Mother > mothers = allMothers . findAll ( motherIdsList ) ; java . util . Collection < java . lang . String > ecIDs = selectDistinct ( collect ( mothers , on ( org . ei . drishti . domain . Mother . class ) . ecCaseId ( ) ) ) ; java . util . List < java . lang . String > ecIdsList = new java . util . ArrayList ( ) ; ecIdsList . addAll ( ecIDs ) ; java . util . List < org . ei . drishti . domain . EligibleCouple > ecs = allEligibleCouples . findAll ( ecIdsList ) ; for ( org . ei . drishti . domain . Child child : children ) { org . ei . drishti . domain . Mother mother = selectUnique ( mothers , having ( on ( org . ei . drishti . domain . Mother . class ) . caseId ( ) , org . hamcrest . Matchers . equalTo ( child . motherCaseId ( ) ) ) ) ; org . ei . drishti . domain . EligibleCouple ec = selectUnique ( ecs , having ( on ( org . ei . drishti . domain . EligibleCouple . class ) . caseId ( ) , org . hamcrest . Matchers . equalTo ( mother . ecCaseId ( ) ) ) ) ; org . ei . drishti . domain . register . ChildRegisterEntry entry = new org . ei . drishti . domain
|
org . junit . Assert . assertEquals ( expectedRegister , register )
|
testConnectionFactoryRef ( ) { org . apache . camel . support . SimpleRegistry registry = new org . apache . camel . support . SimpleRegistry ( ) ; com . rabbitmq . client . ConnectionFactory connectionFactoryMock = org . mockito . Mockito . mock ( com . rabbitmq . client . ConnectionFactory . class ) ; registry . bind ( "connectionFactoryMock" , connectionFactoryMock ) ; org . apache . camel . CamelContext defaultContext = new org . apache . camel . impl . DefaultCamelContext ( registry ) ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap ( ) ; params . put ( "connectionFactory" , "#connectionFactoryMock" ) ; org . apache . camel . component . rabbitmq . RabbitMQEndpoint endpoint = new org . apache . camel . component . rabbitmq . RabbitMQComponent ( defaultContext ) . createEndpoint ( "rabbitmq:localhost/exchange" , "localhost/exchange" , params ) ; "<AssertPlaceHolder>" ; } getConnectionFactory ( ) { return null == ( connectionFactory ) ? getComponent ( ) . getConnectionFactory ( ) : connectionFactory ; }
|
org . junit . Assert . assertSame ( connectionFactoryMock , endpoint . getConnectionFactory ( ) )
|
getArrayFirstElementNoDefaultValueFroMArray ( ) { org . spincast . core . json . JsonArray array = getJsonManager ( ) . createArray ( ) ; java . lang . String arrayFirst = array . getString ( 0 ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { return this . wrappedResultSet . getString ( columnLabel ) ; }
|
org . junit . Assert . assertNull ( arrayFirst )
|
testGet ( ) { final org . apache . nifi . couchbase . CouchbaseMapCacheClient client = new org . apache . nifi . couchbase . CouchbaseMapCacheClient ( ) ; final org . apache . nifi . couchbase . CouchbaseClusterControllerService couchbaseService = mock ( org . apache . nifi . couchbase . CouchbaseClusterControllerService . class ) ; final com . couchbase . client . java . Bucket bucket = mock ( com . couchbase . client . java . Bucket . class ) ; final org . apache . nifi . util . MockControllerServiceInitializationContext serviceInitializationContext = new org . apache . nifi . util . MockControllerServiceInitializationContext ( couchbaseService , "couchbaseService" ) ; final java . util . Map < org . apache . nifi . components . PropertyDescriptor , java . lang . String > properties = new java . util . HashMap ( ) ; properties . put ( org . apache . nifi . couchbase . CouchbaseConfigurationProperties . COUCHBASE_CLUSTER_SERVICE , "couchbaseService" ) ; properties . put ( org . apache . nifi . couchbase . CouchbaseConfigurationProperties . BUCKET_NAME , "bucketA" ) ; final com . couchbase . client . deps . io . netty . buffer . ByteBuf contents = com . couchbase . client . deps . io . netty . buffer . Unpooled . copiedBuffer ( "value" . getBytes ( StandardCharsets . UTF_8 ) ) ; final com . couchbase . client . java . document . BinaryDocument doc = com . couchbase . client . java . document . BinaryDocument . create ( "key" , contents ) ; when ( couchbaseService . openBucket ( eq ( "bucketA" ) ) ) . thenReturn ( bucket ) ; when ( bucket . get ( any ( com . couchbase . client . java . document . BinaryDocument . class ) ) ) . thenReturn ( doc ) ; final org . apache . nifi . util . MockConfigurationContext context = new org . apache . nifi . util . MockConfigurationContext ( properties , serviceInitializationContext ) ; client . configure ( context ) ; final java . lang . String cacheEntry = client . get ( "key" , stringSerializer , stringDeserializer ) ; "<AssertPlaceHolder>" ; } get ( K , org . apache . nifi . distributed . cache . client . Serializer , org . apache . nifi . distributed . cache . client . Deserializer ) { return withCommsSession ( new org . apache . nifi . distributed . cache . client . DistributedMapCacheClientService . CommsAction < V > ( ) { @ org . apache . nifi . distributed . cache . client . Override public V execute ( final org . apache . nifi . distributed . cache . client . CommsSession session ) throws java . io . IOException { final java . io . DataOutputStream dos = new java . io . DataOutputStream ( session . getOutputStream ( ) ) ; dos . writeUTF ( "get" ) ; serialize ( key , keySerializer , dos ) ; dos . flush ( ) ; final java . io . DataInputStream dis = new java . io . DataInputStream ( session . getInputStream ( ) ) ; final byte [ ] responseBuffer = readLengthDelimitedResponse ( dis ) ; return valueDeserializer . deserialize ( responseBuffer ) ; } } ) ; }
|
org . junit . Assert . assertEquals ( "value" , cacheEntry )
|
evaluateNeuralNetworkIris ( ) { org . jpmml . rattle . Batch batch = new org . jpmml . rattle . RattleBatch ( "NeuralNetwork" , "Iris" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getModel ( ) ) ; org . jpmml . evaluator . PMMLManager pmmlManager = new org . jpmml . evaluator . PMMLManager ( pmml ) ; org . jpmml . evaluator . ModelManager < ? > modelManager = pmmlManager . getModelManager ( null , org . jpmml . evaluator . ModelEvaluatorFactory . getInstance ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > input = org . jpmml . evaluator . CsvUtil . load ( batch . getInput ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > output = org . jpmml . evaluator . CsvUtil . load ( batch . getOutput ( ) ) ; org . jpmml . evaluator . Evaluator evaluator = ( ( org . jpmml . evaluator . Evaluator ) ( modelManager ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > > table = org . jpmml . evaluator . Lists . newArrayList ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > activeFields = evaluator . getActiveFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > groupFields = evaluator . getGroupFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > predictedFields = evaluator . getPredictedFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > outputFields = evaluator . getOutputFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > inputFields = org . jpmml . evaluator . Lists . newArrayList ( ) ; inputFields . addAll ( activeFields ) ; inputFields . addAll ( groupFields ) ; for ( int i = 0 ; i < ( input . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > inputRow = input . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > arguments = org . jpmml . evaluator . Maps . newLinkedHashMap ( ) ; for ( org . jpmml . evaluator . FieldName inputField : inputFields ) { java . lang . String inputCell = inputRow . get ( inputField ) ; java . lang . Object inputValue = evaluator . prepare ( inputField , inputCell ) ; arguments . put ( inputField , inputValue ) ; } table . add ( arguments ) ; } if ( ( groupFields . size ( ) ) == 1 ) { org . jpmml . evaluator . FieldName groupField = groupFields . get ( 0 ) ; table = org . jpmml . evaluator . EvaluatorUtil . groupRows ( groupField , table ) ; } else if ( ( groupFields . size ( ) ) > 1 ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } if ( output . isEmpty ( ) ) { for ( int i = 0 ; i < ( table . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; evaluator . evaluate ( arguments ) ; } return true ; } else { if ( ( table . size ( ) ) != ( output . size ( ) ) ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } boolean success = true ; for ( int i = 0 ; i < ( output . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > outputRow = output . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > result = evaluator . evaluate ( arguments ) ; for ( org . jpmml . evaluator . FieldName predictedField : predictedFields ) { java . lang . String outputCell = outputRow . get ( predictedField ) ; java . lang . Object predictedValue = org . jpmml . evaluator . EvaluatorUtil . decode ( result . get ( predictedField ) ) ; success &= org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , predictedValue ) ; } for ( org . jpmml . evaluator . FieldName outputField : outputFields ) { java . lang . String outputCell = outputRow . get ( outputField ) ; java . lang . Object computedValue = result . get ( outputField ) ; success &= ( outputCell != null ) ? org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , computedValue
|
org . junit . Assert . assertTrue ( org . jpmml . rattle . BatchUtil . evaluate ( batch ) )
|
testOutput ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . deeplearning4j . nn . multilayer . MultiLayerConfiguration conf = new org . deeplearning4j . nn . multilayer . NeuralNetConfiguration . Builder ( ) . weightInit ( WeightInit . XAVIER ) . seed ( 12345L ) . list ( ) . layer ( 0 , new org . deeplearning4j . nn . multilayer . DenseLayer . Builder ( ) . nIn ( 784 ) . nOut ( 50 ) . activation ( Activation . RELU ) . build ( ) ) . layer ( 1 , new org . deeplearning4j . nn . multilayer . OutputLayer . Builder ( LossFunctions . LossFunction . MCXENT ) . activation ( Activation . SOFTMAX ) . nIn ( 50 ) . nOut ( 10 ) . build ( ) ) . setInputType ( org . deeplearning4j . nn . conf . inputs . InputType . convolutional ( 28 , 28 , 1 ) ) . build ( ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork net = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf ) ; net . init ( ) ; org . nd4j . linalg . dataset . api . iterator . DataSetIterator fullData = new org . deeplearning4j . datasets . iterator . impl . MnistDataSetIterator ( 1 , 2 ) ; net . fit ( fullData ) ; fullData . reset ( ) ; org . nd4j . linalg . dataset . DataSet expectedSet = fullData . next ( 2 ) ; org . nd4j . linalg . api . ndarray . INDArray expectedOut = net . output ( expectedSet . getFeatures ( ) , false ) ; fullData . reset ( ) ; org . nd4j . linalg . api . ndarray . INDArray actualOut = net . output ( fullData ) ; "<AssertPlaceHolder>" ; } output ( org . nd4j . linalg . api . ndarray . INDArray ) { return mln . output ( batch ) ; }
|
org . junit . Assert . assertEquals ( expectedOut , actualOut )
|
testToBuilder ( ) { org . batfish . datamodel . LocalRoute lr = new org . batfish . datamodel . LocalRoute ( new org . batfish . datamodel . InterfaceAddress ( "1.1.1.1/24" ) , "Ethernet0" ) ; "<AssertPlaceHolder>" ; } toBuilder ( ) { return new org . batfish . datamodel . GeneratedRoute . Builder ( ) . setNetwork ( getNetwork ( ) ) . setAdmin ( getAdministrativeCost ( ) ) . setNonForwarding ( getNonForwarding ( ) ) . setNonRouting ( getNonRouting ( ) ) . setMetric ( firstNonNull ( getMetric ( ) , 0L ) ) . setNextHopIp ( getNextHopIp ( ) ) . setAsPath ( getAsPath ( ) ) . setAttributePolicy ( getAttributePolicy ( ) ) . setCommunities ( getCommunities ( ) ) . setDiscard ( getDiscard ( ) ) . setGenerationPolicy ( getGenerationPolicy ( ) ) . setNextHopInterface ( getNextHopInterface ( ) ) ; }
|
org . junit . Assert . assertThat ( lr , org . hamcrest . Matchers . equalTo ( lr . toBuilder ( ) . build ( ) ) )
|
testComputeLatLonFromStringWithInvalidDecimalDegrees ( ) { gov . nasa . worldwind . geom . LatLon result = au . gov . ga . worldwind . common . util . Util . computeLatLonFromString ( "-90.345,<sp>123.45" ) ; gov . nasa . worldwind . geom . LatLon expected = null ; "<AssertPlaceHolder>" ; } computeLatLonFromString ( java . lang . String ) { return au . gov . ga . worldwind . common . util . Util . computeLatLonFromString ( coordString , null ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
should_return_this ( ) { org . fest . assertions . api . ConcreteAssert returned = assertions . isNotEqualTo ( 8L ) ; "<AssertPlaceHolder>" ; } isNotEqualTo ( byte ) { bytes . assertNotEqualTo ( description , actual , expected ) ; return this ; }
|
org . junit . Assert . assertSame ( assertions , returned )
|
clientPartialServerWholeByteArray ( ) { org . glassfish . tyrus . server . Server server = startServer ( org . glassfish . tyrus . test . standard_config . MessageHandlersTest . WholeByteArray . class ) ; try { final javax . websocket . ClientEndpointConfig cec = ClientEndpointConfig . Builder . create ( ) . build ( ) ; messageLatch = new java . util . concurrent . CountDownLatch ( 1 ) ; org . glassfish . tyrus . client . ClientManager client = createClient ( ) ; client . connectToServer ( new javax . websocket . Endpoint ( ) { @ org . glassfish . tyrus . test . standard_config . Override public void onOpen ( javax . websocket . Session session , javax . websocket . EndpointConfig EndpointConfig ) { session . addMessageHandler ( new javax . websocket . MessageHandler . Whole < byte [ ] > ( ) { @ java . lang . Override public void onMessage ( byte [ ] message ) { if ( new java . lang . String ( message ) . equals ( "In<sp>my<sp>experience,<sp>there's<sp>no<sp>such<sp>thing<sp>as<sp>luck." ) ) { messageLatch . countDown ( ) ; } } } ) ; try { session . getBasicRemote ( ) . sendBinary ( java . nio . ByteBuffer . wrap ( "In<sp>my<sp>experience" . getBytes ( ) ) , false ) ; session . getBasicRemote ( ) . sendBinary ( java . nio . ByteBuffer . wrap ( ",<sp>there's<sp>no<sp>such<sp>" . getBytes ( ) ) , false ) ; session . getBasicRemote ( ) . sendBinary ( java . nio . ByteBuffer . wrap ( "thing<sp>as<sp>luck." . getBytes ( ) ) , true ) ; } catch ( java . io . IOException e ) { } } } , cec , getURI ( org . glassfish . tyrus . test . standard_config . MessageHandlersTest . WholeByteArray . class ) ) ; messageLatch . await ( 1 , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( e . getMessage ( ) , e ) ; } finally { stopServer ( server ) ; } } getCount ( ) { return count ; }
|
org . junit . Assert . assertEquals ( 0 , messageLatch . getCount ( ) )
|
testWSEnumValueUpdate ( ) { boolean result = ihcResourceInteractionService . resourceUpdate ( new org . openhab . binding . ihc . internal . ws . resourcevalues . WSEnumValue ( 300003 , 11111 , 22222 , "test123" ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( result )
|
testSetEnvironmentVariableWithNullValueThrows ( ) { java . lang . String key = "Foo" ; java . lang . String value = null ; org . openqa . selenium . os . CommandLine commandLine = new org . openqa . selenium . os . CommandLine ( org . openqa . selenium . os . CommandLineTest . testExecutable ) ; try { commandLine . setEnvironmentVariable ( key , value ) ; } catch ( java . lang . IllegalArgumentException iae ) { "<AssertPlaceHolder>" ; } } getEnvironment ( ) { throw new java . lang . UnsupportedOperationException ( "getEnvironment" ) ; }
|
org . junit . Assert . assertFalse ( commandLine . getEnvironment ( ) . containsKey ( key ) )
|
foreach_A$VoidFunction1 ( ) { final com . m3 . scalaflavor4j . Flag flag = new com . m3 . scalaflavor4j . Flag ( ) ; com . m3 . scalaflavor4j . None < java . lang . Integer > target = new com . m3 . scalaflavor4j . None < java . lang . Integer > ( ) ; target . foreach ( new com . m3 . scalaflavor4j . VoidF1 < java . lang . Integer > ( ) { public void apply ( java . lang . Integer arg ) { flag . toggle ( ) ; } } ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertFalse ( flag . getValue ( ) )
|
testConvertExplicitToImplicitHydrogens ( ) { java . lang . String rawMolSmiles = "[H]POOSC(Br)C(Cl)C(F)I" ; org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer atomContainer = sp . parseSmiles ( rawMolSmiles ) ; int expResult = 11 ; org . openscience . cdk . interfaces . IAtomContainer result = org . openscience . cdk . smsd . tools . ExtAtomContainerManipulator . convertExplicitToImplicitHydrogens ( atomContainer ) ; "<AssertPlaceHolder>" ; } getAtomCount ( ) { return this . atomCount ; }
|
org . junit . Assert . assertEquals ( expResult , result . getAtomCount ( ) )
|
testJweRsaJwsRsaCert ( ) { java . lang . String address = ( "rs.security.decryption.key.password.provider" 2 + ( org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . PORT ) ) + "/jwejwsrsacert" ; org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean bean = new org . apache . cxf . jaxrs . client . JAXRSClientFactoryBean ( ) ; org . apache . cxf . bus . spring . SpringBusFactory bf = new org . apache . cxf . bus . spring . SpringBusFactory ( ) ; java . net . URL busFile = org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . class . getResource ( "client.xml" ) ; org . apache . cxf . Bus springBus = bf . createBus ( busFile . toString ( ) ) ; bean . setBus ( springBus ) ; bean . setServiceClass ( org . apache . cxf . systest . jaxrs . security . jose . BookStore . class ) ; bean . setAddress ( address ) ; java . util . List < java . lang . Object > providers = new java . util . LinkedList ( ) ; org . apache . cxf . rs . security . jose . jaxrs . JweWriterInterceptor jweWriter = new org . apache . cxf . rs . security . jose . jaxrs . JweWriterInterceptor ( ) ; jweWriter . setUseJweOutputStream ( true ) ; providers . add ( jweWriter ) ; providers . add ( new org . apache . cxf . rs . security . jose . jaxrs . JweClientResponseFilter ( ) ) ; org . apache . cxf . rs . security . jose . jaxrs . JwsWriterInterceptor jwsWriter = new org . apache . cxf . rs . security . jose . jaxrs . JwsWriterInterceptor ( ) ; jwsWriter . setUseJwsOutputStream ( true ) ; providers . add ( jwsWriter ) ; providers . add ( new org . apache . cxf . rs . security . jose . jaxrs . JwsClientResponseFilter ( ) ) ; bean . setProviders ( providers ) ; bean . getProperties ( true ) . put ( "rs.security.keystore.file" , "org/apache/cxf/systest/jaxrs/security/certs/jwkPublicSet.txt" ) ; bean . getProperties ( true ) . put ( "rs.security.signature.out.properties" , org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . CLIENT_JWEJWS_PROPERTIES ) ; bean . getProperties ( true ) . put ( "rs.security.decryption.key.password.provider" 1 , org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . CLIENT_JWEJWS_PROPERTIES ) ; org . apache . cxf . rt . security . rs . PrivateKeyPasswordProvider provider = new org . apache . cxf . systest . jaxrs . security . jose . jwejws . JAXRSJweJwsTest . PrivateKeyPasswordProviderImpl ( ) ; bean . getProperties ( true ) . put ( "rs.security.decryption.key.password.provider" 0 , provider ) ; bean . getProperties ( true ) . put ( "rs.security.decryption.key.password.provider" , provider ) ; org . apache . cxf . systest . jaxrs . security . jose . BookStore bs = bean . create ( org . apache . cxf . systest . jaxrs . security . jose . BookStore . class ) ; org . apache . cxf . jaxrs . client . WebClient . getConfig ( bs ) . getRequestContext ( ) . put ( "rs.security.keystore.alias.jwe.out" , "AliceCert" ) ; org . apache . cxf . jaxrs . client . WebClient . getConfig ( bs ) . getRequestContext ( ) . put ( "rs.security.keystore.alias.jws.in" , "AliceCert" ) ; java . lang . String text = bs . echoText ( "book" ) ; "<AssertPlaceHolder>" ; } echoText ( java . lang . String ) { return text ; }
|
org . junit . Assert . assertEquals ( "book" , text )
|
testRandomIntegerRespectsMinimum ( ) { for ( int i = 0 ; i < 1000 ; i ++ ) { "<AssertPlaceHolder>" ; } } nextInteger ( int , int ) { if ( minimum >= n ) { throw new java . lang . IllegalArgumentException ( "minimum<sp>must<sp>be<sp>less<sp>than<sp>n" ) ; } return minimum + ( org . mafagafogigante . dungeon . game . Random . nextInteger ( ( n - minimum ) ) ) ; }
|
org . junit . Assert . assertEquals ( i , org . mafagafogigante . dungeon . game . Random . nextInteger ( i , ( i + 1 ) ) )
|
testGetWriteSQLErrorsToLog ( ) { classUnderTest . setWriteSQLErrorsToLog ( true ) ; "<AssertPlaceHolder>" ; } getWriteSQLErrorsToLog ( ) { return _writeSQLErrorsToLog ; }
|
org . junit . Assert . assertEquals ( true , classUnderTest . getWriteSQLErrorsToLog ( ) )
|
testIsDisabled ( ) { when ( request . getAttribute ( com . day . cq . wcm . api . WCMMode . class . getName ( ) ) ) . thenReturn ( WCMMode . DISABLED ) ; "<AssertPlaceHolder>" ; verify ( request , atLeast ( 1 ) ) . getAttribute ( com . day . cq . wcm . api . WCMMode . class . getName ( ) ) ; verifyNoMoreInteractions ( request ) ; } isDisabled ( org . apache . sling . api . SlingHttpServletRequest ) { return ( com . day . cq . wcm . api . WCMMode . DISABLED ) == ( com . adobe . acs . commons . util . ModeUtil . getMode ( request ) ) ; }
|
org . junit . Assert . assertTrue ( com . adobe . acs . commons . util . ModeUtil . isDisabled ( request ) )
|
testInvalidOffset ( ) { try { java . lang . String queryString = "offset=four" ; java . net . URI requestUri = new java . net . URI ( ( ( ( org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . URI_STRING ) + "?" ) + queryString ) ) ; when ( uriInfo . getRequestUri ( ) ) . thenReturn ( requestUri ) ; } catch ( java . net . URISyntaxException urise ) { "<AssertPlaceHolder>" ; } org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . QUERY_CONVERTER . convert ( uriInfo ) ; } getRequestUri ( ) { return this . uri ; }
|
org . junit . Assert . assertTrue ( false )
|
testNewAtomType_String ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IAtomType type = builder . newInstance ( org . openscience . cdk . interfaces . IAtomType . class , "C" ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class , java . lang . Object [ ] ) { return factory . ofClass ( clazz , params ) ; }
|
org . junit . Assert . assertNotNull ( type )
|
testEmptyEnvironment ( ) { com . nirima . jenkins . plugins . docker . TestableDockerContainerWatchdog subject = new com . nirima . jenkins . plugins . docker . TestableDockerContainerWatchdog ( ) ; subject . setAllNodes ( new java . util . LinkedList ( ) ) ; subject . setAllClouds ( new java . util . LinkedList ( ) ) ; subject . runExecute ( ) ; "<AssertPlaceHolder>" ; } getAllRemovedNodes ( ) { return java . util . Collections . unmodifiableList ( nodesRemoved ) ; }
|
org . junit . Assert . assertEquals ( 0 , subject . getAllRemovedNodes ( ) . size ( ) )
|
handlesQuotesInCommentsInScripts ( ) { java . lang . String html = "<script>\n" + ( ( ( "<sp><!--\n" + "<sp>document.write(\'</scr\'<sp>+<sp>\'ipt>\');\n" ) + "<sp>//<sp>-->\n" ) + "</script>" ) ; leap . lang . jsoup . parser . Document node = leap . lang . jsoup . Jsoup . parseBodyFragment ( html ) ; "<AssertPlaceHolder>" ; } body ( ) { return findFirstElementByTagName ( "body" , this ) ; }
|
org . junit . Assert . assertEquals ( ( "<script>\n" + ( ( ( "<sp><!--\n" + "<sp>document.write(\'</scr\'<sp>+<sp>\'ipt>\');\n" ) + "<sp>//<sp>-->\n" ) + "</script>" ) ) , node . body ( ) . html ( ) )
|
testLoadResourceAsUri ( ) { org . apache . camel . impl . DefaultClassResolver resolver = new org . apache . camel . impl . DefaultClassResolver ( ) ; java . net . URL url = resolver . loadResourceAsURL ( "log4j2.properties" ) ; "<AssertPlaceHolder>" ; } loadResourceAsURL ( java . lang . String ) { org . apache . camel . util . StringHelper . notEmpty ( uri , "uri" ) ; java . lang . String resolvedName = org . apache . camel . core . osgi . OsgiClassResolver . resolveUriPath ( uri ) ; java . net . URL answer = bundleContext . getBundle ( ) . getResource ( resolvedName ) ; if ( answer == null ) { answer = super . loadResourceAsURL ( uri ) ; } return answer ; }
|
org . junit . Assert . assertNotNull ( url )
|
testCompatibilityIdentical ( ) { org . apache . beam . runners . core . triggers . TriggerStateMachine t1 = org . apache . beam . runners . core . triggers . AfterProcessingTimeStateMachine . pastFirstElementInPane ( ) . plusDelayOf ( org . joda . time . Duration . standardMinutes ( 1L ) ) ; org . apache . beam . runners . core . triggers . TriggerStateMachine t2 = org . apache . beam . runners . core . triggers . AfterProcessingTimeStateMachine . pastFirstElementInPane ( ) . plusDelayOf ( org . joda . time . Duration . standardMinutes ( 1L ) ) ; "<AssertPlaceHolder>" ; } isCompatible ( org . apache . beam . sdk . transforms . windowing . WindowFn ) { return ( other != null ) && ( this . getClass ( ) . equals ( other . getClass ( ) ) ) ; }
|
org . junit . Assert . assertTrue ( t1 . isCompatible ( t2 ) )
|
whenCalculatingPowerSet_thenCorrect ( ) { final java . util . Set < java . lang . Character > chars = com . google . common . collect . ImmutableSet . of ( 'a' , 'b' ) ; final java . util . Set < java . util . Set < java . lang . Character > > result = com . google . common . collect . Sets . powerSet ( chars ) ; final java . util . Set < java . lang . Character > empty = com . google . common . collect . ImmutableSet . < java . lang . Character > builder ( ) . build ( ) ; final java . util . Set < java . lang . Character > a = com . google . common . collect . ImmutableSet . of ( 'a' ) ; final java . util . Set < java . lang . Character > b = com . google . common . collect . ImmutableSet . of ( 'b' ) ; final java . util . Set < java . lang . Character > aB = com . google . common . collect . ImmutableSet . of ( 'a' , 'b' ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , java . lang . Integer ) { return new com . baeldung . kafka . Tuple ( key , value ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . contains ( empty , a , b , aB ) )
|
ERRORIsPlusOne ( ) { com . pawelmaslyk . gerritintegration4sonar . sonar . SonarAnalysisStatus result = SonarAnalysisStatus . ERRORS ; int approval = result . getApproval ( ) ; "<AssertPlaceHolder>" ; } getApproval ( ) { return approval ; }
|
org . junit . Assert . assertEquals ( ( - 2 ) , approval )
|
testBuild ( ) { com . github . dozermapper . core . loader . DozerBuilder builder = new com . github . dozermapper . core . loader . DozerBuilder ( beanContainer , destBeanCreator , new com . github . dozermapper . core . propertydescriptor . PropertyDescriptorFactory ( ) ) ; com . github . dozermapper . core . classmap . MappingFileData result = builder . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( name ) ) ) && ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( clazz ) ) ) ) { elEngine . setVariable ( name , clazz ) ; } super . build ( ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
testBuildWithExmptyParametersAndDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . specoffer . SpecOffer context = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOffer<sp>e<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOffer > 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 )
|
testApplyWithNull1 ( ) { com . liferay . dynamic . data . mapping . form . evaluator . internal . function . ContainsFunction containsFunction = new com . liferay . dynamic . data . mapping . form . evaluator . internal . function . ContainsFunction ( ) ; java . lang . Boolean result = containsFunction . apply ( null , "forms" ) ; "<AssertPlaceHolder>" ; } apply ( java . math . BigDecimal , java . math . BigDecimal ) { return n1 . pow ( n2 . intValue ( ) ) ; }
|
org . junit . Assert . assertFalse ( result )
|
testGetMolecularFormula_IAtomNullCharge ( ) { org . openscience . cdk . interfaces . IAtomContainer ac = org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; ac . addAtom ( org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; ac . getAtom ( 0 ) . setFormalCharge ( ( ( java . lang . Integer ) ( CDKConstants . UNSET ) ) ) ; ac . addAtom ( org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; ac . addAtom ( org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "H" ) ) ; ac . addAtom ( org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "H" ) ) ; ac . addAtom ( org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "H" ) ) ; ac . addAtom ( org . openscience . cdk . tools . manipulator . MolecularFormulaManipulatorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "H" ) ) ; org . openscience . cdk . interfaces . IMolecularFormula mf1 = org . openscience . cdk . tools . manipulator . MolecularFormulaManipulator . getMolecularFormula ( ac ) ; "<AssertPlaceHolder>" ; } getMolecularFormula ( org . openscience . cdk . interfaces . IAtomContainer ) { org . openscience . cdk . interfaces . IMolecularFormula formula = atomContainer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ; return org . openscience . cdk . tools . manipulator . MolecularFormulaManipulator . getMolecularFormula ( atomContainer , formula ) ; }
|
org . junit . Assert . assertNotNull ( mf1 )
|
shouldKnowWhenAUniqueBrowserSessionHasBeenRequested ( ) { net . thucydides . core . annotations . ManagedWebDriverAnnotatedField managedField = net . thucydides . core . annotations . ManagedWebDriverAnnotatedField . findFirstAnnotatedField ( net . thucydides . core . annotations . WhenReadingManagedDriverAnnotations . SampleTestCaseUsingUniqueSessionWithChrome . class ) ; "<AssertPlaceHolder>" ; } isUniqueSession ( ) { return net . thucydides . core . annotations . TestCaseAnnotations . isUniqueSession ( getTestClass ( ) . getJavaClass ( ) ) ; }
|
org . junit . Assert . assertThat ( managedField . isUniqueSession ( ) , is ( true ) )
|
testMarshallable ( ) { int capacity = 2 * 1024 ; java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . allocateDirect ( capacity ) ; long addr = ( ( sun . nio . ch . DirectBuffer ) ( byteBuffer ) ) . address ( ) ; net . openhft . lang . io . NativeBytes nativeBytes = new net . openhft . lang . io . NativeBytes ( addr , ( addr + capacity ) ) ; net . openhft . lang . io . serialization . BytesMarshallable bm = new net . openhft . lang . io . serialization . ByteMarshallableMarshallerTest . MockBytesMarshallable ( 12345678 ) ; nativeBytes . writeObject ( bm ) ; nativeBytes . finish ( ) ; nativeBytes . clear ( ) ; net . openhft . lang . io . serialization . BytesMarshallable bm2 = nativeBytes . readObject ( net . openhft . lang . io . serialization . ByteMarshallableMarshallerTest . MockBytesMarshallable . class ) ; "<AssertPlaceHolder>" ; } readObject ( java . lang . Class ) { return this . bytes . readObject ( tClass ) ; }
|
org . junit . Assert . assertEquals ( bm , bm2 )
|
testNonDatedEntities ( ) { org . slc . sli . domain . Entity staff = buildStaffEntity ( ) ; org . slc . sli . domain . Entity entityToExtract = org . mockito . Mockito . mock ( org . slc . sli . domain . Entity . class ) ; org . mockito . Mockito . when ( entityToExtract . getType ( ) ) . thenReturn ( EntityNames . STAFF ) ; org . joda . time . DateTime seoaDate = new org . joda . time . DateTime ( ) . plusYears ( 1 ) ; org . slc . sli . domain . Entity seoa = buildSeoa ( staff . getEntityId ( ) , "edOrg1" , seoaDate , seoaDate . minusMonths ( 1 ) ) ; org . slc . sli . domain . NeutralQuery q = resolver . buildStaffEdorgQuery ( staff . getEntityId ( ) ) ; when ( repo . findAll ( EntityNames . STAFF_ED_ORG_ASSOCIATION , q ) ) . thenReturn ( java . util . Arrays . asList ( seoa ) ) ; org . slc . sli . bulk . extract . context . resolver . impl . StaffTeacherContextResolver spyResolver = org . mockito . Mockito . spy ( resolver ) ; org . mockito . Mockito . doReturn ( false ) . when ( spyResolver ) . shouldExtract ( entityToExtract , seoaDate ) ; org . mockito . Mockito . when ( extractorHelper . updateEdorgToDateMap ( seoa . getBody ( ) , new java . util . HashMap < java . lang . String , org . joda . time . DateTime > ( ) , ParameterConstants . EDUCATION_ORGANIZATION_REFERENCE , ParameterConstants . BEGIN_DATE , ParameterConstants . END_DATE ) ) . thenReturn ( new java . util . HashMap < java . lang . String , org . joda . time . DateTime > ( ) ) ; "<AssertPlaceHolder>" ; } resolve ( org . slc . sli . domain . Entity , org . slc . sli . domain . Entity ) { return null ; }
|
org . junit . Assert . assertEquals ( 0 , spyResolver . resolve ( staff , entityToExtract ) . size ( ) )
|
testCyclic_Int ( ) { org . openscience . cdk . ringsearch . RingSearch ringSearch = new org . openscience . cdk . ringsearch . RingSearch ( fusedRings ) ; for ( int i = 0 ; i < ( fusedRings . getAtomCount ( ) ) ; i ++ ) "<AssertPlaceHolder>" ; } cyclic ( int ) { return cyclic . get ( v ) ; }
|
org . junit . Assert . assertTrue ( ringSearch . cyclic ( i ) )
|
testPaths ( ) { org . openscience . cdk . interfaces . IAtomContainer triazole = org . openscience . cdk . templates . TestMoleculeFactory . make123Triazole ( ) ; org . openscience . cdk . fingerprint . ShortestPathWalker walker = new org . openscience . cdk . fingerprint . ShortestPathWalker ( triazole ) ; java . util . Set < java . lang . String > expected = new java . util . TreeSet < java . lang . String > ( java . util . Arrays . asList ( "N2N1C" 2 , "N2N1N" , "N" , "N1N1C" , "N1C2C" , "C1N" , "N2N1C" , "C1N2N" , "N2N1C" 0 , "N2N1C" 3 , "N2N1C" 4 , "C2C" , "N2N1C" 1 , "N1N2N" , "N1N" ) ) ; java . util . Set < java . lang . String > actual = walker . paths ( ) ; "<AssertPlaceHolder>" ; } paths ( ) { int [ ] [ ] paths = new int [ this . paths . size ( ) ] [ 0 ] ; for ( int i = 0 ; i < ( this . paths . size ( ) ) ; i ++ ) paths [ i ] = this . paths . get ( i ) ; return paths ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
|
countEventsAcceptsBlankFilters ( ) { org . phenotips . security . audit . AuditEvent template = new org . phenotips . security . audit . AuditEvent ( null , null , null , null , null , null ) ; when ( this . store . countEvents ( template , null , null ) ) . thenReturn ( 42L ) ; when ( this . auth . hasAccess ( this . user , Right . ADMIN , this . xwikiPreferences ) ) . thenReturn ( true ) ; long result = this . scriptService . countEvents ( "<sp>" , "<sp>" , "<sp>" , "<sp>" , "<sp>" , "<sp>" ) ; org . mockito . Mockito . verify ( this . store ) . countEvents ( template , null , null ) ; "<AssertPlaceHolder>" ; } countEvents ( org . phenotips . security . audit . AuditEvent , java . util . Calendar , java . util . Calendar ) { try { org . hibernate . Session session = this . sessionFactory . getSessionFactory ( ) . openSession ( ) ; org . hibernate . Criteria c = session . createCriteria ( org . phenotips . security . audit . AuditEvent . class ) ; if ( eventTemplate != null ) { c . add ( org . hibernate . criterion . Example . create ( eventTemplate ) ) ; } setTimeInterval ( c , fromTime , toTime ) ; c . setProjection ( org . hibernate . criterion . Projections . rowCount ( ) ) ; @ org . phenotips . security . audit . internal . SuppressWarnings ( "rawtypes" ) java . util . List foundEntries = c . list ( ) ; if ( ( foundEntries != null ) && ( ! ( foundEntries . isEmpty ( ) ) ) ) { return ( ( long ) ( foundEntries . get ( 0 ) ) ) ; } return 0 ; } catch ( org . hibernate . HibernateException ex ) { this . logger . error ( "Failed<sp>to<sp>count<sp>audit<sp>event<sp>documents:<sp>{}" , ex . getMessage ( ) , ex ) ; return - 1 ; } }
|
org . junit . Assert . assertEquals ( 42L , result )
|
validate_shouldPassValidationIfAllFieldsAreCorrect ( ) { org . openmrs . Form form = new org . openmrs . Form ( ) ; form . setName ( "test" ) ; form . setVersion ( "1.0" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( form , "form" ) ; new org . openmrs . validator . FormValidator ( ) . validate ( form , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
|
org . junit . Assert . assertFalse ( errors . hasErrors ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.