input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
model_3 ( ) { org . apache . jena . rdf . model . Model assem = org . apache . jena . util . FileManager . get ( ) . loadModel ( ( ( org . apache . jena . sdb . test . misc . TestAssembler . dir ) + "graph-assembler.ttl" ) ) ; org . apache . jena . rdf . model . Resource xDft = assem . getResource ( "http://example/test#graphDft" ) ; org . apache . jena . rdf . model . Resource xNamed = assem . getResource ( "http://example/test#graphNamed" ) ; org . apache . jena . sdb . Store store = create ( assem ) ; org . apache . jena . rdf . model . Model model1 = ( ( org . apache . jena . rdf . model . Model ) ( Assembler . general . open ( xDft ) ) ) ; org . apache . jena . rdf . model . Model model2 = ( ( org . apache . jena . rdf . model . Model ) ( Assembler . general . open ( xNamed ) ) ) ; "<AssertPlaceHolder>" ; } open ( java . lang . String ) { java . lang . String uriSchemeName = org . apache . jena . util . FileUtils . getScheme ( uri ) ; if ( ! ( "jar" . equalsIgnoreCase ( uriSchemeName ) ) ) { return null ; } java . lang . String [ ] parts = uri . substring ( 4 ) . split ( "!" ) ; if ( ( parts . length ) != 2 ) { return null ; } if ( parts [ 0 ] . toLowerCase ( ) . startsWith ( "file:" ) ) { parts [ 0 ] = parts [ 0 ] . substring ( 5 ) ; } if ( parts [ 1 ] . startsWith ( "/" ) ) { parts [ 1 ] = parts [ 1 ] . substring ( 1 ) ; } org . apache . jena . riot . system . stream . LocatorZip zl = new org . apache . jena . riot . system . stream . LocatorZip ( parts [ 0 ] ) ; return zl . open ( parts [ 1 ] ) ; }
org . junit . Assert . assertNotNull ( ( model1 != model2 ) )
sumEvenFibonacciTest ( ) { sio2box . it . testclasses . BenchmarkTestClass benchmarkTestClass = new sio2box . it . testclasses . BenchmarkTestClass ( ) ; benchmarkTestClass . sumEvenFibonacci ( ) ; "<AssertPlaceHolder>" ; } getBytes ( ) { return sio2box . api . ThreadTrackingContext . getThreadContext ( ) . getBytesUsed ( ) ; }
org . junit . Assert . assertEquals ( 0 , sio2box . api . ThreadTrackingContext . getBytes ( ) )
testNodeNum ( ) { cn . alfred . util . TreeNode < java . lang . Integer > root = new cn . alfred . util . TreeNode ( 2 ) ; root . setLeft ( new cn . alfred . util . TreeNode < java . lang . Integer > ( 1 ) ) ; root . setRight ( new cn . alfred . util . TreeNode < java . lang . Integer > ( 3 ) ) ; int number = new cn . alfredyuan . day03 . CompleteBTNodeNumber < java . lang . Integer > ( ) . nodeNum ( root ) ; "<AssertPlaceHolder>" ; } nodeNum ( cn . alfred . util . TreeNode ) { if ( head == null ) { return 0 ; } return bs ( head , 1 , mostLeftLevel ( head , 1 ) ) ; }
org . junit . Assert . assertEquals ( 3 , number )
isDestroyedWhenWithZeroHitPointsOrLower ( ) { hitPointBasedDestructibility . reduce ( com . fundynamic . d2tm . game . behaviors . HitPointBasedDestructibilityTest . MAX_HIT_POINTS ) ; "<AssertPlaceHolder>" ; } isZero ( ) { return ( ( getXAsInt ( ) ) == 0 ) && ( ( getYAsInt ( ) ) == 0 ) ; }
org . junit . Assert . assertTrue ( hitPointBasedDestructibility . isZero ( ) )
testHasRelatedQueriesSuggestionsFalseByDefault ( ) { com . liferay . portal . search . web . internal . suggestions . display . context . SuggestionsPortletDisplayContext suggestionsPortletDisplayContext = _displayBuilder . build ( ) ; "<AssertPlaceHolder>" ; } hasRelatedQueriesSuggestions ( ) { return _hasRelatedQueriesSuggestions ; }
org . junit . Assert . assertFalse ( suggestionsPortletDisplayContext . hasRelatedQueriesSuggestions ( ) )
shouldDeserialiseFromJsonWhenDirectedTypeIsDirected ( ) { final java . lang . String json = "{\"class\":<sp>\"uk.gov.gchq.gaffer.data.element.Edge\",<sp>\"directedType\":<sp>\"DIRECTED\"}" ; final uk . gov . gchq . gaffer . data . element . Edge deserialisedEdge = uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . deserialise ( json . getBytes ( ) , uk . gov . gchq . gaffer . data . element . Edge . class ) ; "<AssertPlaceHolder>" ; } isDirected ( ) { return directed ; }
org . junit . Assert . assertTrue ( deserialisedEdge . isDirected ( ) )
testRequestWithoutAuthorization ( ) { javax . servlet . http . HttpServletRequest request = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletRequest . class ) ; javax . servlet . http . HttpServletResponse response = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletResponse . class ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( response ) . addHeader ( org . apache . hadoop . security . authentication . server . WWW_AUTHENTICATE_HEADER , org . apache . hadoop . security . authentication . server . BASIC ) ; org . mockito . Mockito . verify ( response ) . addHeader ( org . apache . hadoop . security . authentication . server . WWW_AUTHENTICATE_HEADER , org . apache . hadoop . security . authentication . server . NEGOTIATE ) ; org . mockito . Mockito . verify ( response ) . setStatus ( HttpServletResponse . SC_UNAUTHORIZED ) ; } authenticate ( java . net . URL , org . apache . hadoop . security . authentication . client . AuthenticatedURL$Token ) { if ( ! ( hasDelegationToken ( url ) ) ) { super . authenticate ( url , token ) ; } }
org . junit . Assert . assertNull ( handler . authenticate ( request , response ) )
testGetTotalNumberOfRecords ( ) { org . apache . hadoop . conf . Configuration conf = buildConfiguration ( ) ; org . apache . hive . storage . jdbc . dao . DatabaseAccessor accessor = org . apache . hive . storage . jdbc . dao . DatabaseAccessorFactory . getAccessor ( conf ) ; int numRecords = accessor . getTotalNumberOfRecords ( conf ) ; "<AssertPlaceHolder>" ; } getTotalNumberOfRecords ( org . apache . hadoop . conf . Configuration ) { java . sql . Connection conn = null ; java . sql . PreparedStatement ps = null ; java . sql . ResultSet rs = null ; try { initializeDatabaseConnection ( conf ) ; java . lang . String sql = org . apache . hive . storage . jdbc . conf . JdbcStorageConfigManager . getQueryToExecute ( conf ) ; java . lang . String countQuery = ( "SELECT<sp>COUNT(*)<sp>FROM<sp>(" + sql ) + ")<sp>tmptable" ; org . apache . hive . storage . jdbc . dao . GenericJdbcDatabaseAccessor . LOGGER . info ( "Query<sp>to<sp>execute<sp>is<sp>[{}]" , countQuery ) ; conn = dbcpDataSource . getConnection ( ) ; ps = conn . prepareStatement ( countQuery ) ; rs = ps . executeQuery ( ) ; if ( rs . next ( ) ) { return rs . getInt ( 1 ) ; } else { org . apache . hive . storage . jdbc . dao . GenericJdbcDatabaseAccessor . LOGGER . warn ( "The<sp>count<sp>query<sp>did<sp>not<sp>return<sp>any<sp>results." , countQuery ) ; throw new org . apache . hive . storage . jdbc . exception . HiveJdbcDatabaseAccessException ( "Count<sp>query<sp>did<sp>not<sp>return<sp>any<sp>results." ) ; } } catch ( org . apache . hive . storage . jdbc . exception . HiveJdbcDatabaseAccessException he ) { throw he ; } catch ( java . lang . Exception e ) { org . apache . hive . storage . jdbc . dao . GenericJdbcDatabaseAccessor . LOGGER . error ( "Caught<sp>exception<sp>while<sp>trying<sp>to<sp>get<sp>the<sp>number<sp>of<sp>records" , e ) ; throw new org . apache . hive . storage . jdbc . exception . HiveJdbcDatabaseAccessException ( e ) ; } finally { cleanupResources ( conn , ps , rs ) ; } }
org . junit . Assert . assertThat ( numRecords , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( 5 ) ) )
matchesCannotBeDeletedWithNoMatchingMessage ( ) { matcher = new com . wounit . matchers . CanBeDeletedMatcher < com . webobjects . eocontrol . EOEnterpriseObject > ( "another<sp>error" ) ; org . mockito . Mockito . doThrow ( new com . webobjects . foundation . NSValidation . ValidationException ( "error" ) ) . when ( mockObject ) . validateForDelete ( ) ; 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 ) )
formatatomacceptXML ( ) { com . fujitsu . dc . core . rs . odata . ODataEntityResource odataEntityResource = new com . fujitsu . dc . core . rs . odata . ODataEntityResource ( ) ; javax . ws . rs . core . MediaType type = odataEntityResource . decideOutputFormat ( null , "atom" ) ; "<AssertPlaceHolder>" ; } decideOutputFormat ( java . lang . String , java . lang . String ) { javax . ws . rs . core . MediaType mediaType = null ; if ( format != null ) { mediaType = decideOutputFormatFromQueryValue ( format ) ; } else if ( accept != null ) { mediaType = decideOutputFormatFromHeaderValues ( accept ) ; } if ( mediaType == null ) { mediaType = javax . ws . rs . core . MediaType . APPLICATION_ATOM_XML_TYPE ; } return mediaType ; }
org . junit . Assert . assertEquals ( MediaType . APPLICATION_ATOM_XML_TYPE , type )
fromString ( ) { final java . lang . String bindingSetString = "http://b<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::" + ( "http://c<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::" + "http://a<<~>>http://www.w3.org/2001/XMLSchema#anyURI" ) ; final org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder varOrder = new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "y" , "z" , "x" ) ; final org . apache . rya . indexing . pcj . storage . accumulo . BindingSetConverter < java . lang . String > converter = new org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter ( ) ; final org . eclipse . rdf4j . query . BindingSet bindingSet = converter . convert ( bindingSetString , varOrder ) ; final org . eclipse . rdf4j . query . impl . MapBindingSet expected = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; expected . addBinding ( "x" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://a" ) ) ; expected . addBinding ( "y" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://b" ) ) ; expected . addBinding ( "z" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://c" ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String , org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ) { requireNonNull ( bindingSetString ) ; requireNonNull ( varOrder ) ; if ( ( bindingSetString . isEmpty ( ) ) && ( varOrder . toString ( ) . isEmpty ( ) ) ) { return new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; } final java . lang . String [ ] bindingStrings = bindingSetString . split ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . BINDING_DELIM ) ; final java . lang . String [ ] varOrderArr = varOrder . toArray ( ) ; checkArgument ( ( ( varOrderArr . length ) == ( bindingStrings . length ) ) , "The<sp>number<sp>of<sp>Bindings<sp>must<sp>match<sp>the<sp>length<sp>of<sp>the<sp>VariableOrder." ) ; final org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bindingSet = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; for ( int i = 0 ; i < ( bindingStrings . length ) ; i ++ ) { final java . lang . String bindingString = bindingStrings [ i ] ; if ( ! ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . NULL_VALUE_STRING . equals ( bindingString ) ) ) { final java . lang . String name = varOrderArr [ i ] ; final org . eclipse . rdf4j . model . Value value = org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . toValue ( bindingStrings [ i ] ) ; bindingSet . addBinding ( name , value ) ; } } return bindingSet ; }
org . junit . Assert . assertEquals ( expected , bindingSet )
shouldLock ( ) { final org . talend . dataprep . lock . LockFactory delegate = mock ( org . talend . dataprep . lock . LockFactory . class ) ; final org . talend . dataprep . lock . DistributedLock mock = mock ( org . talend . dataprep . lock . DistributedLock . class ) ; when ( mock . getKey ( ) ) . thenReturn ( "1234" ) ; when ( delegate . getLock ( eq ( "1234" ) ) ) . thenReturn ( mock ) ; final org . talend . dataprep . lock . DistributedLockWatcher watcher = new org . talend . dataprep . lock . DistributedLockWatcher ( delegate ) ; final org . talend . dataprep . lock . DistributedLock lock = watcher . getLock ( "1234" ) ; lock . lock ( ) ; verify ( mock , times ( 1 ) ) . lock ( ) ; "<AssertPlaceHolder>" ; } getLocks ( ) { return org . talend . dataprep . lock . Collections . unmodifiableCollection ( locks . values ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , watcher . getLocks ( ) . size ( ) )
getMatchingLinesOfTextShouldFindCorrectLinesWhenBetweenOtherLines ( ) { final java . util . List < net . usikkert . kouchat . android . util . Line > lines = net . usikkert . kouchat . android . util . RobotiumTestUtils . getMatchingLinesOfText ( "something<sp>http://kouchat.googlecode.com<sp>here" , java . util . Arrays . asList ( "something<sp>" , "http://" , "kouchat.googlecode" , ".com" , "<sp>here" ) , "http://kouchat.googlecode.com" ) ; "<AssertPlaceHolder>" ; correctLineContent ( lines . get ( 0 ) , 1 , "http://" ) ; correctLineContent ( lines . get ( 1 ) , 2 , "kouchat.googlecode" ) ; correctLineContent ( lines . get ( 2 ) , 3 , ".com" ) ; } size ( ) { return userList . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , lines . size ( ) )
testEmptyConstructor ( ) { org . eurekastreams . commons . exceptions . PrincipalPopulationException sut = new org . eurekastreams . commons . exceptions . PrincipalPopulationException ( ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
org . junit . Assert . assertNull ( sut . getMessage ( ) )
testGate ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Gate g = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Gate ( true , null ) ; g . setID ( ) ; "<AssertPlaceHolder>" ; } setID ( ) { id = ( it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . GenericGameObject . created ) ++ ; }
org . junit . Assert . assertNotNull ( g )
testNullMultiCondCaseStatement ( ) { java . lang . String query = "SELECT<sp>CASE<sp>WHEN<sp>entity_id<sp>=<sp>'000000000000000'<sp>THEN<sp>1<sp>WHEN<sp>entity_id<sp>=<sp>'000000000000001'<sp>THEN<sp>2<sp>END<sp>FROM<sp>ATABLE<sp>WHERE<sp>organization_id=?" ; java . lang . String url = ( ( ( ( PHOENIX_JDBC_URL ) + ";" ) + ( com . salesforce . phoenix . util . PhoenixRuntime . CURRENT_SCN_ATTRIB ) ) + "=" ) + ( ( ts ) + 5 ) ; java . util . Properties props = new java . util . Properties ( TEST_PROPERTIES ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( url , props ) ; try { java . sql . PreparedStatement statement = conn . prepareStatement ( query ) ; statement . setString ( 1 , com . salesforce . phoenix . end2end . QueryTest . tenantId ) ; java . sql . ResultSet rs = statement . executeQuery ( ) ; java . sql . ResultSetMetaData rsm = rs . getMetaData ( ) ; "<AssertPlaceHolder>" ; } finally { conn . close ( ) ; } } isNullable ( int ) { return getParam ( index ) . isNullable ( ) ? java . sql . ResultSetMetaData . columnNullable : java . sql . ResultSetMetaData . columnNoNulls ; }
org . junit . Assert . assertEquals ( ResultSetMetaData . columnNullable , rsm . isNullable ( 1 ) )
experimentSaveModelTest ( ) { builder . experiment ( ExperimentType . SAVE_MODEL , "saveModel" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; }
org . junit . Assert . assertEquals ( builder . type . toString ( ) , ExperimentType . SAVE_MODEL . toString ( ) )
testDeployVirtualMachineUsingARMTemplate ( ) { "<AssertPlaceHolder>" ; } runSample ( com . microsoft . azure . management . Azure ) { final java . lang . String rgName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "rgRSAT" , 24 ) ; final java . lang . String deploymentName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "dpRSAT" , 24 ) ; try { java . lang . String templateJson = com . microsoft . azure . management . resources . samples . DeployVirtualMachineUsingARMTemplate . getTemplate ( ) ; System . out . println ( templateJson ) ; System . out . println ( ( "Creating<sp>a<sp>resource<sp>group<sp>with<sp>name:<sp>" + rgName ) ) ; azure . resourceGroups ( ) . define ( rgName ) . withRegion ( Region . US_WEST ) . create ( ) ; System . out . println ( ( "dpRSAT" 2 + rgName ) ) ; System . out . println ( ( "dpRSAT" 0 + deploymentName ) ) ; azure . deployments ( ) . define ( deploymentName ) . withExistingResourceGroup ( rgName ) . withTemplate ( templateJson ) . withParameters ( "{}" ) . withMode ( DeploymentMode . INCREMENTAL ) . create ( ) ; System . out . println ( ( "Started<sp>a<sp>deployment<sp>for<sp>an<sp>Azure<sp>Virtual<sp>Machine<sp>with<sp>managed<sp>disks:<sp>" + deploymentName ) ) ; com . microsoft . azure . management . resources . Deployment deployment = azure . deployments ( ) . getByResourceGroup ( rgName , deploymentName ) ; System . out . println ( ( "Current<sp>deployment<sp>status<sp>:<sp>" + ( deployment . provisioningState ( ) ) ) ) ; while ( ! ( ( ( deployment . provisioningState ( ) . equalsIgnoreCase ( "Succeeded" ) ) || ( deployment . provisioningState ( ) . equalsIgnoreCase ( "Failed" ) ) ) || ( deployment . provisioningState ( ) . equalsIgnoreCase ( "Cancelled" ) ) ) ) { com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . sleep ( 10000 ) ; deployment = azure . deployments ( ) . getByResourceGroup ( rgName , deploymentName ) ; System . out . println ( ( "Current<sp>deployment<sp>status<sp>:<sp>" + ( deployment . provisioningState ( ) ) ) ) ; } return true ; } catch ( java . lang . Exception f ) { System . out . println ( f . getMessage ( ) ) ; f . printStackTrace ( ) ; } finally { try { System . out . println ( ( "dpRSAT" 3 + rgName ) ) ; azure . resourceGroups ( ) . beginDeleteByName ( rgName ) ; System . out . println ( ( "Deleted<sp>Resource<sp>Group:<sp>" + rgName ) ) ; } catch ( java . lang . NullPointerException npe ) { System . out . println ( "dpRSAT" 1 ) ; } catch ( java . lang . Exception g ) { g . printStackTrace ( ) ; } } return false ; }
org . junit . Assert . assertTrue ( com . microsoft . azure . management . resources . samples . DeployVirtualMachineUsingARMTemplate . runSample ( azure ) )
testMagic ( ) { io . jafka . message . Message m = new io . jafka . message . Message ( "demo" . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } magic ( ) { return buffer . get ( io . jafka . message . Message . MAGIC_OFFSET ) ; }
org . junit . Assert . assertEquals ( 1 , m . magic ( ) )
filter_not_exists_scoping_04 ( ) { org . apache . jena . sparql . algebra . Op orig = org . apache . jena . sparql . sse . SSE . parseOp ( org . apache . jena . atlas . lib . StrUtils . strjoinNL ( "<sp>(project<sp>(?openTriplets)" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" , "<sp>(group<sp>()<sp>((?.0<sp>(count<sp>?x)))" , "<sp>(filter<sp>(notexists" , "<sp>(quadpattern<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?z<sp>?c<sp>?x)))" , "<sp>(quadpattern" , "<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?x<sp>?a<sp>?y)" , "<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?y<sp>?b<sp>?z)" , "<sp>)))))" ) ) ; org . apache . jena . sparql . algebra . Op expected = org . apache . jena . sparql . sse . SSE . parseOp ( org . apache . jena . atlas . lib . StrUtils . strjoinNL ( "<sp>(project<sp>(?openTriplets)" , "<sp>(extend<sp>((?openTriplets<sp>?.0))" , "<sp>(group<sp>()<sp>((?.0<sp>(count<sp>?x)))" , "<sp>(filter<sp>(notexists" , "<sp>(quadpattern<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?z<sp>?c<sp>?x)))" , "<sp>(quadpattern" , "<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?x<sp>?a<sp>?y)" , "<sp>(quad<sp><urn:x-arq:DefaultGraphNode><sp>?y<sp>?b<sp>?z)" , "<sp>)))))" ) ) ; org . apache . jena . sparql . algebra . Op transformed = org . apache . jena . sparql . algebra . optimize . TransformScopeRename . transform ( orig ) ; "<AssertPlaceHolder>" ; } transform ( org . apache . jena . sparql . algebra . Op ) { return new org . apache . jena . sparql . algebra . optimize . TransformScopeRename . TransformScopeRename$ ( op ) . work ( ) ; }
org . junit . Assert . assertEquals ( transformed , expected )
getSnapshotsInIntervalGetInDAY_DifferenDayesSavedTest ( ) { date = getDate ( 2016 , 3 , 20 ) ; ds2 . setCreated ( date ) ; dataStatisticsStore . save ( ds2 ) ; dataStatisticsStore . save ( ds3 ) ; dataStatisticsStore . save ( ds4 ) ; dataStatisticsStore . save ( ds5 ) ; java . util . List < org . hisp . dhis . datastatistics . AggregatedStatistics > asList = dataStatisticsStore . getSnapshotsInInterval ( EventInterval . DAY , getDate ( 2015 , 3 , 19 ) , getDate ( 2016 , 3 , 21 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return messages . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , asList . size ( ) )
testXMLMetadataWithTripInService ( ) { final org . apache . olingo . client . api . edm . xml . XMLMetadata metadata = client . getDeserializer ( ContentType . APPLICATION_XML ) . toMetadata ( getClass ( ) . getResourceAsStream ( "metadata_TripInService.xml" ) ) ; "<AssertPlaceHolder>" ; org . apache . olingo . client . api . serialization . ODataMetadataValidation metadataValidator = client . metadataValidation ( ) ; metadataValidator . validateMetadata ( metadata ) ; } toMetadata ( java . io . InputStream ) { try { java . io . ByteArrayOutputStream byteArrayOutputStream = new java . io . ByteArrayOutputStream ( ) ; org . apache . commons . io . IOUtils . copy ( input , byteArrayOutputStream ) ; byte [ ] inputContent = byteArrayOutputStream . toByteArray ( ) ; java . io . InputStream inputStream1 = new java . io . ByteArrayInputStream ( inputContent ) ; org . apache . olingo . client . api . edm . xml . Edmx edmx = getXmlMapper ( ) . readValue ( inputStream1 , org . apache . olingo . client . core . edm . xml . ClientCsdlEdmx . class ) ; java . io . InputStream inputStream2 = new java . io . ByteArrayInputStream ( inputContent ) ; java . util . List < java . util . List < java . lang . String > > schemaNameSpaces = getAllSchemaNameSpace ( inputStream2 ) ; return new org . apache . olingo . client . core . edm . ClientCsdlXMLMetadata ( edmx , schemaNameSpaces ) ; } catch ( java . lang . Exception e ) { throw new java . lang . IllegalArgumentException ( "Could<sp>not<sp>parse<sp>as<sp>Edmx<sp>document" , e ) ; } }
org . junit . Assert . assertNotNull ( metadata )
testAdaptEMFDefaultPresent ( ) { org . eclipse . emf . ecore . EObject obj = EcoreFactory . eINSTANCE . createEObject ( ) ; org . eclipse . papyrus . infra . core . utils . AdapterUtilsTest . EMFAdapter emf = new org . eclipse . papyrus . infra . core . utils . AdapterUtilsTest . EMFAdapter ( obj ) ; "<AssertPlaceHolder>" ; } adapt ( java . lang . Object , java . lang . Class , T ) { T result = defaultAdapter ; if ( object != null ) { com . google . common . base . Optional < T > adapter = org . eclipse . papyrus . infra . core . utils . AdapterUtils . adapt ( object , type ) ; if ( adapter . isPresent ( ) ) { result = adapter . get ( ) ; } } return result ; }
org . junit . Assert . assertThat ( org . eclipse . papyrus . infra . core . utils . AdapterUtils . adapt ( obj , org . eclipse . papyrus . infra . core . utils . AdapterUtilsTest . EMFAdapter . class , null ) , org . hamcrest . CoreMatchers . is ( emf ) )
testGetUIThreadWhileLifeCycleInExecute ( ) { entryPointManager . register ( TestRequest . DEFAULT_SERVLET_PATH , org . eclipse . rap . rwt . internal . lifecycle . RWTLifeCycle_Test . TestEntryPoint . class , null ) ; org . eclipse . rap . rwt . internal . lifecycle . RWTLifeCycle lifeCycle = new org . eclipse . rap . rwt . internal . lifecycle . RWTLifeCycle ( getApplicationContext ( ) ) ; final java . util . concurrent . atomic . AtomicReference < java . lang . Thread > currentThread = new java . util . concurrent . atomic . AtomicReference ( ) ; final java . util . concurrent . atomic . AtomicReference < java . lang . Thread > uiThread = new java . util . concurrent . atomic . AtomicReference ( ) ; lifeCycle . addPhaseListener ( new org . eclipse . rap . rwt . internal . lifecycle . PhaseListener ( ) { private static final long serialVersionUID = 1L ; @ org . eclipse . rap . rwt . internal . lifecycle . Override public org . eclipse . rap . rwt . internal . lifecycle . PhaseId getPhaseId ( ) { return PhaseId . PREPARE_UI_ROOT ; } @ org . eclipse . rap . rwt . internal . lifecycle . Override public void beforePhase ( org . eclipse . rap . rwt . internal . lifecycle . PhaseEvent event ) { } @ org . eclipse . rap . rwt . internal . lifecycle . Override public void afterPhase ( org . eclipse . rap . rwt . internal . lifecycle . PhaseEvent event ) { currentThread . set ( java . lang . Thread . currentThread ( ) ) ; uiThread . set ( org . eclipse . rap . rwt . internal . lifecycle . LifeCycleUtil . getUIThread ( org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) ) . getThread ( ) ) ; } } ) ; lifeCycle . execute ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return RWT . NLS . getISO8859_1Encoded ( org . eclipse . ui . internal . cheatsheets . Messages . BUNDLE_NAME , org . eclipse . ui . internal . cheatsheets . Messages . class ) ; }
org . junit . Assert . assertSame ( currentThread . get ( ) , uiThread . get ( ) )
constructor_saves_if_modified ( ) { com . microsoft . azure . sdk . iot . service . transport . amqps . AmqpResponseVerification testVerification = new com . microsoft . azure . sdk . iot . service . transport . amqps . AmqpResponseVerification ( mockedModified ) ; new mockit . Verifications ( ) { { "<AssertPlaceHolder>" ; } } ; } getException ( ) { return this . exception ; }
org . junit . Assert . assertNull ( testVerification . getException ( ) )
testSave ( ) { int before = countRowsInTable ( org . sculptor . examples . library . media . domain . Book . class ) ; org . sculptor . examples . library . media . domain . Book ddd = new org . sculptor . examples . library . media . domain . Book ( "Domain-Driven<sp>Design" , "0-321-12521-5" ) ; mediaRepository . save ( ddd ) ; "<AssertPlaceHolder>" ; } countRowsInTable ( java . lang . Class ) { javax . persistence . Query query = getEntityManager ( ) . createQuery ( ( ( "select<sp>count(e)<sp>from<sp>" + ( domainObjectClass . getSimpleName ( ) ) ) + "<sp>e" ) ) ; return ( ( java . lang . Integer ) ( query . getSingleResult ( ) ) ) ; }
org . junit . Assert . assertEquals ( ( before + 1 ) , countRowsInTable ( org . sculptor . examples . library . media . domain . Book . class ) )
getPropertyAsBoolean_true ( ) { java . util . Properties props = java . lang . System . getProperties ( ) ; props . setProperty ( ConfigKey . GENERATOR_PATH . getValue ( ) , "true" ) ; boolean property = ch . puzzle . itc . mobiliar . common . util . ConfigurationService . getPropertyAsBoolean ( ConfigKey . GENERATOR_PATH , false ) ; "<AssertPlaceHolder>" ; } getPropertyAsBoolean ( ch . puzzle . itc . mobiliar . common . util . ConfigKey , java . lang . Boolean ) { java . lang . String propValue = ch . puzzle . itc . mobiliar . common . util . ConfigurationService . getPropertyValue ( key ) ; if ( propValue != null ) { return "true" . equals ( propValue . toLowerCase ( ) ) ; } return defaultValue ; }
org . junit . Assert . assertTrue ( property )
testHidePredicateBindingInfo ( ) { view . hidePredicateBindingInfo ( ) ; "<AssertPlaceHolder>" ; } hidePredicateBindingInfo ( ) { predicateBindingInfo . hidden = true ; }
org . junit . Assert . assertTrue ( predicateBindingInfo . hidden )
testConnectJDBC ( ) { org . junit . Assume . assumeTrue ( jdbcConnectable ) ; java . sql . Connection conn = null ; try { conn = connectionManager . getConn ( ) ; "<AssertPlaceHolder>" ; } finally { org . apache . kylin . common . persistence . JDBCConnectionManager . closeQuietly ( conn ) ; } } getConn ( ) { return dataSource . getConnection ( ) ; }
org . junit . Assert . assertNotNull ( conn )
testGetImplicitFilterWithIndexColorModel ( ) { org . apache . xmlgraphics . image . loader . ImageSize is = org . apache . fop . render . RawPNGTestUtil . getImageSize ( ) ; java . awt . image . IndexColorModel cm = mock ( java . awt . image . IndexColorModel . class ) ; org . apache . xmlgraphics . image . loader . impl . ImageRawPNG irpng = mock ( org . apache . xmlgraphics . image . loader . impl . ImageRawPNG . class ) ; when ( irpng . getColorModel ( ) ) . thenReturn ( cm ) ; when ( irpng . getBitDepth ( ) ) . thenReturn ( 8 ) ; when ( irpng . getSize ( ) ) . thenReturn ( is ) ; org . apache . fop . render . ps . ImageEncoderPNG iepng = new org . apache . fop . render . ps . ImageEncoderPNG ( irpng ) ; java . lang . String expectedFilter = "<<<sp>/Predictor<sp>15<sp>/Columns<sp>32<sp>/Colors<sp>1<sp>/BitsPerComponent<sp>8<sp>>><sp>/FlateDecode" ; "<AssertPlaceHolder>" ; } getImplicitFilter ( ) { org . apache . xmlgraphics . ps . PSDictionary dict = new org . apache . xmlgraphics . ps . PSDictionary ( ) ; dict . put ( "/Columns" , ccitt . getSize ( ) . getWidthPx ( ) ) ; int compression = ccitt . getCompression ( ) ; switch ( compression ) { case org . apache . xmlgraphics . image . codec . tiff . TIFFImage . COMP_FAX_G3_1D : dict . put ( "/K" , 0 ) ; break ; case org . apache . xmlgraphics . image . codec . tiff . TIFFImage . COMP_FAX_G3_2D : dict . put ( "/K" , 1 ) ; break ; case org . apache . xmlgraphics . image . codec . tiff . TIFFImage . COMP_FAX_G4_2D : dict . put ( "/K" , ( - 1 ) ) ; break ; default : throw new java . lang . IllegalStateException ( ( "Invalid<sp>compression<sp>scheme:<sp>" + compression ) ) ; } return ( dict . toString ( ) ) + "<sp>/CCITTFaxDecode" ; }
org . junit . Assert . assertEquals ( expectedFilter , iepng . getImplicitFilter ( ) )
testTileSizeRenderingHint ( ) { final java . awt . RenderingHints renderingHints = new java . awt . RenderingHints ( null ) ; try { renderingHints . put ( GPF . KEY_TILE_SIZE , null ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception expected ) { } try { renderingHints . put ( GPF . KEY_TILE_SIZE , new java . lang . Object ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception expected ) { } try { renderingHints . put ( GPF . KEY_TILE_SIZE , new java . awt . Dimension ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception expected ) { } final java . awt . Dimension tileSize = new java . awt . Dimension ( 1 , 1 ) ; renderingHints . put ( GPF . KEY_TILE_SIZE , tileSize ) ; "<AssertPlaceHolder>" ; } get ( int ) { if ( index >= ( numberOfBins ) ) { throw new java . lang . IllegalStateException ( java . lang . String . format ( "Index<sp>out<sp>of<sp>range.<sp>Maximum<sp>is<sp>%d<sp>but<sp>was<sp>%d" , ( ( numberOfBins ) - 1 ) , index ) ) ; } if ( firstGet ) { try { writeBinList ( lastFileIndex , currentBinList ) ; } catch ( java . io . IOException e ) { org . esa . beam . binning . operator . TemporalBinList . logger . log ( Level . SEVERE , "Error<sp>storing<sp>temporal<sp>bins." , e ) ; return null ; } finally { firstGet = false ; } } synchronized ( currentBinList ) { try { int currentFileIndex = calculateFileIndex ( index ) ; if ( currentFileIndex != ( lastFileIndex ) ) { currentBinList . clear ( ) ; readBinList ( currentFileIndex , currentBinList ) ; lastFileIndex = currentFileIndex ; } int fileBinOffset = ( binsPerFile ) * currentFileIndex ; return currentBinList . get ( ( index - fileBinOffset ) ) ; } catch ( java . io . IOException e ) { org . esa . beam . binning . operator . TemporalBinList . logger . log ( Level . SEVERE , java . lang . String . format ( "Error<sp>getting<sp>temporal<sp>bin<sp>at<sp>index<sp>%d." , index ) , e ) ; } } return null ; }
org . junit . Assert . assertSame ( tileSize , renderingHints . get ( GPF . KEY_TILE_SIZE ) )
test_WithLimitAndOrder ( ) { java . lang . String json = com . google . common . io . Resources . toString ( com . google . common . io . Resources . getResource ( "query_withLimitAndOrder.json" ) , Charsets . UTF_8 ) ; org . kairosdb . client . builder . QueryBuilder builder = org . kairosdb . client . builder . QueryBuilder . getInstance ( ) ; builder . setStart ( 2 , TimeUnit . MONTHS ) ; org . kairosdb . client . builder . QueryMetric metric = builder . addMetric ( "metric1" ) ; metric . setLimit ( 10 ) ; metric . setOrder ( QueryMetric . Order . DESCENDING ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return gson . fromJson ( json , org . kairosdb . client . testUtils . MetricParser . listType ) ; }
org . junit . Assert . assertThat ( parser . parse ( builder . build ( ) ) , org . hamcrest . CoreMatchers . equalTo ( parser . parse ( json ) ) )
actionPost ( ) { io . seldon . client . beans . ActionBean actionBean = new io . seldon . client . beans . ActionBean ( "1" , "10" , 1 ) ; actionBean . setActionId ( 1L ) ; io . seldon . client . beans . ActionBean responseBean = apiClient . addAction ( actionBean ) ; "<AssertPlaceHolder>" ; } addAction ( io . seldon . client . services . ActionBean ) { java . lang . String url = getUrl ( Constants . ACTIONS ) ; return performPost ( url , actionBean ) ; }
org . junit . Assert . assertEquals ( responseBean , actionBean )
AnnotationAppearanceTest ( ) { com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( ( ( com . itextpdf . kernel . pdf . PdfNameTreeTest . destinationFolder ) + "AnnotationAppearanceTest.pdf" ) ) ) ; com . itextpdf . kernel . pdf . PdfPage page = pdfDocument . addNewPage ( ) ; com . itextpdf . kernel . pdf . canvas . PdfCanvas canvas = new com . itextpdf . kernel . pdf . canvas . PdfCanvas ( page ) ; canvas . setFillColor ( ColorConstants . MAGENTA ) . beginText ( ) . setFontAndSize ( com . itextpdf . kernel . font . PdfFontFactory . createFont ( StandardFonts . TIMES_ROMAN ) , 30 ) . setTextMatrix ( 25 , 500 ) . showText ( "This<sp>file<sp>has<sp>AP<sp>key<sp>in<sp>Names<sp>dictionary" ) . endText ( ) ; com . itextpdf . kernel . pdf . PdfArray array = new com . itextpdf . kernel . pdf . PdfArray ( ) ; array . add ( new com . itextpdf . kernel . pdf . PdfString ( "normalAppearance" ) ) ; array . add ( new com . itextpdf . kernel . pdf . annot . PdfAnnotationAppearance ( ) . setState ( PdfName . N , new com . itextpdf . kernel . pdf . xobject . PdfFormXObject ( new com . itextpdf . kernel . geom . Rectangle ( 50 , 50 , 50 , 50 ) ) ) . getPdfObject ( ) ) ; com . itextpdf . kernel . pdf . PdfDictionary dict = new com . itextpdf . kernel . pdf . PdfDictionary ( ) ; dict . put ( PdfName . Names , array ) ; com . itextpdf . kernel . pdf . PdfDictionary dictionary = new com . itextpdf . kernel . pdf . PdfDictionary ( ) ; dictionary . put ( PdfName . AP , dict ) ; pdfDocument . getCatalog ( ) . getPdfObject ( ) . put ( PdfName . Names , dictionary ) ; com . itextpdf . kernel . pdf . PdfNameTree appearance = pdfDocument . getCatalog ( ) . getNameTree ( PdfName . AP ) ; java . util . Map < java . lang . String , com . itextpdf . kernel . pdf . PdfObject > objs = appearance . getNames ( ) ; pdfDocument . close ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return segments . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , objs . size ( ) )
testWriteNullValueFlush ( ) { @ org . apache . kafka . connect . storage . SuppressWarnings ( "unchecked" ) org . apache . kafka . connect . util . Callback < java . lang . Void > callback = org . powermock . api . easymock . PowerMock . createMock ( org . apache . kafka . connect . util . Callback . class ) ; expectStore ( org . apache . kafka . connect . storage . OffsetStorageWriterTest . OFFSET_KEY , org . apache . kafka . connect . storage . OffsetStorageWriterTest . OFFSET_KEY_SERIALIZED , null , null , callback , false , null ) ; org . powermock . api . easymock . PowerMock . replayAll ( ) ; writer . offset ( org . apache . kafka . connect . storage . OffsetStorageWriterTest . OFFSET_KEY , null ) ; "<AssertPlaceHolder>" ; writer . doFlush ( callback ) . get ( 1000 , TimeUnit . MILLISECONDS ) ; org . powermock . api . easymock . PowerMock . verifyAll ( ) ; } beginFlush ( ) { if ( flushing ( ) ) { org . apache . kafka . connect . storage . OffsetStorageWriter . log . error ( ( "Invalid<sp>call<sp>to<sp>OffsetStorageWriter<sp>flush()<sp>while<sp>already<sp>flushing,<sp>the<sp>" + "framework<sp>should<sp>not<sp>allow<sp>this" ) ) ; throw new org . apache . kafka . connect . errors . ConnectException ( "OffsetStorageWriter<sp>is<sp>already<sp>flushing" ) ; } if ( data . isEmpty ( ) ) return false ; assert ! ( flushing ( ) ) ; toFlush = data ; data = new java . util . HashMap ( ) ; return true ; }
org . junit . Assert . assertTrue ( writer . beginFlush ( ) )
or_tag_predicate_does_not_match_pickle_none_of_the_tags ( ) { gherkin . events . PickleEvent pickleEvent = createPickleWithTags ( java . util . Collections . < gherkin . pickles . PickleTag > emptyList ( ) ) ; com . github . timm . cucumber . runtime . TagPredicate predicate = new com . github . timm . cucumber . runtime . TagPredicate ( asList ( com . github . timm . cucumber . runtime . TagPredicateTest . FOO_OR_BAR_TAG_VALUE ) ) ; "<AssertPlaceHolder>" ; } apply ( java . util . Collection ) { for ( com . github . timm . cucumber . runtime . TagExpressionOld oldStyleExpression : oldStyleExpressions ) { if ( ! ( oldStyleExpression . evaluate ( pickleTags ) ) ) { return false ; } } java . util . List < java . lang . String > tags = new java . util . ArrayList < java . lang . String > ( ) ; for ( gherkin . pickles . PickleTag pickleTag : pickleTags ) { tags . add ( pickleTag . getName ( ) ) ; } for ( io . cucumber . tagexpressions . Expression expression : expressions ) { if ( ! ( expression . evaluate ( tags ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertFalse ( predicate . apply ( pickleEvent ) )
createStringPath ( ) { com . querydsl . core . types . Path < java . lang . String > path = pathFactory . createStringPath ( metadata ) ; "<AssertPlaceHolder>" ; } createStringPath ( com . querydsl . core . types . PathMetadata ) { return com . querydsl . core . types . dsl . Expressions . stringPath ( metadata ) ; }
org . junit . Assert . assertNotNull ( path )
testMissedInvertedMatchMissingField ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "42" ) ; rule . setInverted ( true ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "someother" , "30" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; }
org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) )
shouldMarkTransitionFromSuperadminToSuperadminAsValidWhenPerformedBySuperadmin ( ) { stubSecurityContextWithAuthentication ( ) ; stubCurrentUserRole ( com . qcadoo . security . internal . validators . ROLE_SUPERADMIN ) ; stubRoleTransition ( com . qcadoo . security . internal . validators . ROLE_SUPERADMIN , com . qcadoo . security . internal . validators . ROLE_SUPERADMIN ) ; final boolean isValid = userRoleValidationService . checkUserCreatingSuperadmin ( userDataDefMock , userEntityMock ) ; "<AssertPlaceHolder>" ; } checkUserCreatingSuperadmin ( com . qcadoo . model . api . DataDefinition , com . qcadoo . model . api . Entity ) { java . lang . Boolean isRoleSuperadminInNewGroup = securityService . hasRole ( entity , QcadooSecurityConstants . ROLE_SUPERADMIN ) ; java . lang . Boolean isRoleSuperadminInOldGroup = ( ( entity . getId ( ) ) == null ) ? false : securityService . hasRole ( dataDefinition . get ( entity . getId ( ) ) , QcadooSecurityConstants . ROLE_SUPERADMIN ) ; if ( ( com . google . common . base . Objects . equal ( isRoleSuperadminInOldGroup , isRoleSuperadminInNewGroup ) ) || ( isCurrentUserShopOrSuperAdmin ( dataDefinition ) ) ) { return true ; } entity . addError ( dataDefinition . getField ( UserFields . GROUP ) , "qcadooUsers.validate.global.error.forbiddenRole" ) ; return false ; }
org . junit . Assert . assertTrue ( isValid )
VertxServerRequestToHttpServletRequest ( io . vertx . ext . web . RoutingContext , io . vertx . core . http . HttpServerRequest ) { io . vertx . ext . web . impl . HttpServerRequestWrapper wrapper = new io . vertx . ext . web . impl . HttpServerRequestWrapper ( request ) ; new mockit . Expectations ( ) { { context . request ( ) ; result = wrapper ; } } ; org . apache . servicecomb . foundation . vertx . http . VertxServerRequestToHttpServletRequest reqEx = new org . apache . servicecomb . foundation . vertx . http . VertxServerRequestToHttpServletRequest ( context , "abc" ) ; "<AssertPlaceHolder>" ; } getRequestURI ( ) { return "/path" ; }
org . junit . Assert . assertEquals ( "abc" , reqEx . getRequestURI ( ) )
checkCreation ( ) { info . smart_tools . smartactors . scope . iscope_provider_container . IScopeProviderContainer scopeProviderContainer = new info . smart_tools . smartactors . scope . scope_provider_container . ScopeProviderContainer ( mock ( info . smart_tools . smartactors . scope . iscope . IScopeFactory . class ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( scopeProviderContainer )
testIndex1 ( ) { com . orientechnologies . orient . core . sql . parser . SimpleNode result = checkRightSyntax ( "select<sp>from<sp>index:collateCompositeIndexCS<sp>where<sp>key<sp>=<sp>['VAL',<sp>'VaL']" ) ; "<AssertPlaceHolder>" ; com . orientechnologies . orient . core . sql . parser . OSelectStatement select = ( ( com . orientechnologies . orient . core . sql . parser . OSelectStatement ) ( result ) ) ; } checkRightSyntax ( java . lang . String ) { com . orientechnologies . orient . core . sql . parser . SimpleNode result = checkSyntax ( query , true ) ; return checkSyntax ( result . toString ( ) , true ) ; }
org . junit . Assert . assertTrue ( ( result instanceof com . orientechnologies . orient . core . sql . parser . OSelectStatement ) )
matchesCannotBeSavedWithMatchingMessage ( ) { matcher = new com . wounit . matchers . CanBeDeletedMatcher < com . webobjects . eocontrol . EOEnterpriseObject > ( "error" ) ; org . mockito . Mockito . doThrow ( new com . webobjects . foundation . NSValidation . ValidationException ( "error" ) ) . when ( mockObject ) . validateForDelete ( ) ; 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 ( false ) )
should_accept_recovery_for_existant_email ( ) { boolean sentEmail = tryToSendResetPasswordEmail ( validEmail ) ; "<AssertPlaceHolder>" ; } tryToSendResetPasswordEmail ( java . lang . String ) { return navigate ( ) . post ( "/esqueci-minha-senha" , br . com . caelum . vraptor . test . http . Parameters . initWith ( "email" , email ) ) ; }
org . junit . Assert . assertTrue ( sentEmail )
testWriteUsAscii ( ) { java . lang . String usAscii = "NettyRocks" ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( 16 ) ; buf . writeBytes ( usAscii . getBytes ( CharsetUtil . US_ASCII ) ) ; io . netty . buffer . ByteBuf buf2 = io . netty . buffer . Unpooled . buffer ( 16 ) ; io . netty . buffer . ByteBufUtil . writeAscii ( buf2 , usAscii ) ; "<AssertPlaceHolder>" ; buf . release ( ) ; buf2 . release ( ) ; } writeAscii ( io . netty . buffer . ByteBufAllocator , java . lang . CharSequence ) { io . netty . buffer . ByteBuf buf = alloc . buffer ( seq . length ( ) ) ; io . netty . buffer . ByteBufUtil . writeAscii ( buf , seq ) ; return buf ; }
org . junit . Assert . assertEquals ( buf , buf2 )
testFetchByPrimaryKeyExisting ( ) { com . liferay . asset . kernel . model . AssetTag newAssetTag = addAssetTag ( ) ; com . liferay . asset . kernel . model . AssetTag existingAssetTag = _persistence . fetchByPrimaryKey ( newAssetTag . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingAssetTag , newAssetTag )
testGetMaxSize ( ) { "<AssertPlaceHolder>" ; } getMaxSize ( ) { return net . seninp . jmotif . sax . alphabet . NormalAlphabet . MAX_SIZE ; }
org . junit . Assert . assertEquals ( a . getMaxSize ( ) , java . lang . Integer . valueOf ( 20 ) )
testGetNonStringValue ( ) { final java . lang . String key = "Key" ; final org . apache . logging . log4j . message . ObjectMapMessage msg = new org . apache . logging . log4j . message . ObjectMapMessage ( ) . with ( key , 1L ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return org . slf4j . MDC . get ( key ) ; }
org . junit . Assert . assertEquals ( "1" , msg . get ( key ) )
testValidate_2 ( ) { java . lang . String line = "email<sp>toto1@company.net,<sp>toto2@company.net<sp>with<sp>this<sp>message" ; net . roboconf . core . commands . EmailCommandInstruction instr = new net . roboconf . core . commands . EmailCommandInstruction ( this . context , line , 1 ) ; java . util . List < net . roboconf . core . model . ParsingError > errors = instr . validate ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
syncAlertsMetadataWithError ( ) { final long count = 10L ; final java . lang . String collectionName = "alert" ; when ( mongoOps . getCollectionName ( eq ( org . sentilo . web . catalog . domain . Alert . class ) ) ) . thenReturn ( collectionName ) ; when ( mongoOps . count ( any ( org . springframework . data . mongodb . core . query . Query . class ) , eq ( org . sentilo . web . catalog . domain . Alert . class ) ) ) . thenReturn ( count ) ; when ( mongoOps . find ( any ( org . springframework . data . mongodb . core . query . Query . class ) , eq ( org . sentilo . web . catalog . domain . Alert . class ) , eq ( collectionName ) ) ) . thenReturn ( buildMockList ( alert , count ) ) ; doThrow ( org . sentilo . common . exception . RESTClientException . class ) . doNothing ( ) . when ( platformService ) . saveResources ( any ( org . sentilo . web . catalog . domain . PlatformAdminInputMessage . class ) ) ; service . syncAlertsMetadata ( ) ; final boolean syncAlertsIsRunning = ( ( java . lang . Boolean ) ( org . springframework . test . util . ReflectionTestUtils . getField ( service , "syncAlertsIsRunning" ) ) ) ; "<AssertPlaceHolder>" ; verify ( mongoOps ) . count ( any ( org . springframework . data . mongodb . core . query . Query . class ) , eq ( org . sentilo . web . catalog . domain . Alert . class ) ) ; verify ( platformService , times ( 2 ) ) . saveResources ( any ( org . sentilo . web . catalog . domain . PlatformAdminInputMessage . class ) ) ; verify ( mongoOps , times ( 2 ) ) . updateMulti ( any ( org . springframework . data . mongodb . core . query . Query . class ) , any ( org . springframework . data . mongodb . core . query . Update . class ) , eq ( alert . getClass ( ) ) ) ; } syncAlertsMetadata ( ) { if ( syncAlertsIsRunning ) { org . sentilo . web . catalog . admin . service . impl . SynchronizationServiceImpl . LOGGER . warn ( "Previous<sp>sync<sp>alerts<sp>job<sp>is<sp>already<sp>running!" ) ; return ; } try { final long startTime = java . lang . System . currentTimeMillis ( ) ; syncAlertsIsRunning = true ; final int resourcesSync = syncResourcesMetadata ( org . sentilo . web . catalog . domain . Alert . class , "providerId" , "applicationId" , "active" ) ; if ( resourcesSync > 0 ) { org . sentilo . web . catalog . admin . service . impl . SynchronizationServiceImpl . LOGGER . info ( "Process<sp>finished.<sp>{}<sp>alerts<sp>synchronized<sp>in<sp>{}<sp>ms" , resourcesSync , ( ( java . lang . System . currentTimeMillis ( ) ) - startTime ) ) ; } } catch ( final java . lang . Exception e ) { org . sentilo . web . catalog . admin . service . impl . SynchronizationServiceImpl . LOGGER . error ( "Sync<sp>process<sp>aborted<sp>due<sp>to<sp>an<sp>error<sp>(it<sp>will<sp>restart<sp>shortly):<sp>{}<sp>" , e . getMessage ( ) , e ) ; } finally { syncAlertsIsRunning = false ; } }
org . junit . Assert . assertFalse ( syncAlertsIsRunning )
testBuilderExampleMappings ( ) { com . networknt . schema . JsonSchemaFactory instance = com . networknt . schema . JsonSchemaFactory . getInstance ( ) ; java . net . URL example = new java . net . URL ( "http://example.com/invalid/schema/url" ) ; try { com . networknt . schema . JsonSchema schema = instance . getSchema ( example ) ; schema . validate ( mapper . createObjectNode ( ) ) ; org . junit . Assert . fail ( "Expected<sp>exception<sp>not<sp>thrown" ) ; } catch ( com . networknt . schema . JsonSchemaException ex ) { java . lang . Throwable cause = ex . getCause ( ) ; if ( ! ( ( cause instanceof java . io . FileNotFoundException ) || ( cause instanceof java . net . UnknownHostException ) ) ) { org . junit . Assert . fail ( "Unexpected<sp>cause<sp>for<sp>JsonSchemaException" ) ; } } catch ( java . lang . Exception ex ) { org . junit . Assert . fail ( "Unexpected<sp>exception<sp>thrown" ) ; } java . net . URL mappings = com . networknt . schema . url . URLFactory . toURL ( "resource:tests/url_mapping/invalid-schema-url.json" ) ; com . networknt . schema . JsonMetaSchema draftV4 = com . networknt . schema . JsonMetaSchema . getDraftV4 ( ) ; com . networknt . schema . JsonSchemaFactory . Builder builder = com . networknt . schema . JsonSchemaFactory . builder ( ) . defaultMetaSchemaURI ( draftV4 . getUri ( ) ) . addMetaSchema ( draftV4 ) . addUrlMappings ( getUrlMappingsFromUrl ( mappings ) ) ; instance = builder . build ( ) ; com . networknt . schema . JsonSchema schema = instance . getSchema ( example ) ; "<AssertPlaceHolder>" ; } validate ( com . fasterxml . jackson . databind . JsonNode ) { return validate ( node , node , com . networknt . schema . AT_ROOT ) ; }
org . junit . Assert . assertEquals ( 0 , schema . validate ( mapper . createObjectNode ( ) ) . size ( ) )
ensureThatTheShuffleMethodChangesTheOrderOfTheCards ( ) { java . util . List < com . clinkworks . solitaire . datatype . Card > cards = com . google . common . collect . Lists . newArrayList ( ) ; for ( com . clinkworks . solitaire . datatype . Rank rank : com . clinkworks . solitaire . datatype . Rank . standardRanks ( ) ) { for ( com . clinkworks . solitaire . datatype . Suit suit : com . clinkworks . solitaire . datatype . Suit . standardSuits ( ) ) { cards . add ( new com . clinkworks . solitaire . datatype . Card ( rank , suit , com . clinkworks . solitaire . datatype . CardState . FACE_DOWN ) ) ; } } boolean allElementsAreTheSame = true ; com . clinkworks . solitaire . datatype . Deck deck = new com . clinkworks . solitaire . datatype . Deck ( cards ) ; java . util . List < com . clinkworks . solitaire . datatype . Card > currentCardState = deck . getCards ( ) ; deck . shuffle ( ) ; for ( int i = 0 ; i < ( cards . size ( ) ) ; i ++ ) { if ( ( cards . get ( i ) ) != ( currentCardState . get ( i ) ) ) { allElementsAreTheSame = false ; break ; } } "<AssertPlaceHolder>" ; } shuffle ( ) { java . util . Collections . shuffle ( getInternalData ( ) ) ; return this ; }
org . junit . Assert . assertFalse ( allElementsAreTheSame )
testNullInitialResultOfSubscriptionQueryReportedAsEmptyMono ( ) { when ( mockBus . subscriptionQuery ( anySubscriptionMessage ( java . lang . String . class , java . lang . String . class ) , any ( ) , anyInt ( ) ) ) . thenReturn ( new org . axonframework . queryhandling . DefaultSubscriptionQueryResult ( reactor . core . publisher . Mono . just ( new org . axonframework . queryhandling . GenericQueryResponseMessage ( java . lang . String . class , ( ( java . lang . String ) ( null ) ) ) ) , reactor . core . publisher . Flux . empty ( ) , ( ) -> true ) ) ; org . axonframework . queryhandling . SubscriptionQueryResult < java . lang . String , java . lang . String > actual = testSubject . subscriptionQuery ( "Test" , instanceOf ( java . lang . String . class ) , instanceOf ( java . lang . String . class ) ) ; "<AssertPlaceHolder>" ; } initialResult ( ) { return initialResult ; }
org . junit . Assert . assertNull ( actual . initialResult ( ) . block ( ) )
shouldFetchByState ( ) { java . lang . String serviceName = java . util . UUID . randomUUID ( ) . toString ( ) ; java . lang . String serviceId = java . util . UUID . randomUUID ( ) . toString ( ) ; client . agentClient ( ) . register ( 8080 , 20L , serviceName , serviceId , com . orbitz . consul . HealthITest . NO_TAGS , com . orbitz . consul . HealthITest . NO_META ) ; client . agentClient ( ) . warn ( serviceId ) ; boolean found = false ; com . orbitz . consul . model . ConsulResponse < java . util . List < com . orbitz . consul . model . health . HealthCheck > > response = client . healthClient ( ) . getChecksByState ( State . WARN ) ; for ( com . orbitz . consul . model . health . HealthCheck healthCheck : response . getResponse ( ) ) { if ( ( healthCheck . getServiceId ( ) . isPresent ( ) ) && ( healthCheck . getServiceId ( ) . get ( ) . equals ( serviceId ) ) ) { found = true ; } } "<AssertPlaceHolder>" ; client . agentClient ( ) . deregister ( serviceId ) ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( com . orbitz . consul . model . ConsulResponse . getClass ( ) ) != ( o . getClass ( ) ) ) ) return false ; com . orbitz . consul . model . ConsulResponse that = ( ( com . orbitz . consul . model . ConsulResponse ) ( o ) ) ; return ( ( ( com . google . common . base . Objects . equal ( this . response , that . response ) ) && ( com . google . common . base . Objects . equal ( this . lastContact , that . lastContact ) ) ) && ( com . google . common . base . Objects . equal ( this . knownLeader , that . knownLeader ) ) ) && ( com . google . common . base . Objects . equal ( this . index , that . index ) ) ; }
org . junit . Assert . assertTrue ( found )
testCascadeTraining ( ) { java . io . File temp = java . io . File . createTempFile ( "fannj_" , ".tmp" ) ; temp . deleteOnExit ( ) ; org . apache . commons . io . IOUtils . copy ( this . getClass ( ) . getResourceAsStream ( "parity8.train" ) , new java . io . FileOutputStream ( temp ) ) ; com . googlecode . fannj . Fann fann = new com . googlecode . fannj . FannShortcut ( 8 , 1 ) ; com . googlecode . fannj . Trainer trainer = new com . googlecode . fannj . Trainer ( fann ) ; float desiredError = 0.0F ; float mse = trainer . cascadeTrain ( temp . getPath ( ) , 30 , 1 , desiredError ) ; "<AssertPlaceHolder>" ; } cascadeTrain ( java . lang . String , int , int , float ) { setTrainingAlgorithm ( TrainingAlgorithm . FANN_TRAIN_RPROP ) ; com . googlecode . fannj . Trainer . fann_cascadetrain_on_file ( fann . ann , dataFile , maxNeurons , neuronsBetweenReports , desiredError ) ; return com . googlecode . fannj . Trainer . fann_get_MSE ( fann . ann ) ; }
org . junit . Assert . assertTrue ( ( "" + mse ) , ( mse <= desiredError ) )
extremeLargeSelectionRange ( ) { org . zkoss . zss . api . impl . Book book = org . zkoss . zss . api . impl . Util . loadBook ( this , "book/excelsortsample.xlsx" ) ; org . zkoss . zss . api . impl . Sheet sheet = book . getSheet ( "SampleData" ) ; long startTime = org . zkoss . zss . api . impl . Calendar . getInstance ( ) . getTimeInMillis ( ) ; org . zkoss . zss . api . impl . Ranges . range ( sheet , "A1:H100000000" ) . sort ( org . zkoss . zss . api . impl . Ranges . range ( sheet , "A1:A11" ) , true , null , null , false , null , null , false , null , true , false , false ) ; long endTime = org . zkoss . zss . api . impl . Calendar . getInstance ( ) . getTimeInMillis ( ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { if ( ( org . zkoss . zss . api . BookSeriesBuilder . _instance ) == null ) { synchronized ( org . zkoss . zss . api . BookSeriesBuilder . class ) { if ( ( org . zkoss . zss . api . BookSeriesBuilder . _instance ) == null ) { org . zkoss . zss . api . BookSeriesBuilder . _instance = new org . zkoss . zss . api . BookSeriesBuilder . BookSeriesBuilderWrap ( ) ; } } } return org . zkoss . zss . api . BookSeriesBuilder . _instance ; }
org . junit . Assert . assertEquals ( true , ( ( ( endTime - startTime ) / 1000 ) < 1 ) )
testIt ( ) { java . io . PrintWriter pw = new java . io . PrintWriter ( new java . io . FileWriter ( configPath ) ) ; pw . println ( "cordinator:" ) ; pw . close ( ) ; try { new com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator ( configPath ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( com . liveramp . hank . config . InvalidConfigurationException e ) { } pw = new java . io . PrintWriter ( new java . io . FileWriter ( configPath ) ) ; pw . println ( "coordinator:" ) ; pw . close ( ) ; try { new com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator ( configPath ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( com . liveramp . hank . config . InvalidConfigurationException e ) { } pw = new java . io . PrintWriter ( new java . io . FileWriter ( configPath ) ) ; pw . println ( "coordinator:" ) ; pw . println ( "<sp>blah:<sp>blah" ) ; pw . close ( ) ; try { new com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator ( configPath ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( com . liveramp . hank . config . InvalidConfigurationException e ) { } pw = new java . io . PrintWriter ( new java . io . FileWriter ( configPath ) ) ; pw . println ( "coordinator:" ) ; pw . println ( "<sp>factory:<sp>1" ) ; pw . close ( ) ; try { new com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator ( configPath ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( com . liveramp . hank . config . InvalidConfigurationException e ) { } pw = new java . io . PrintWriter ( new java . io . FileWriter ( configPath ) ) ; pw . println ( "coordinator:" ) ; pw . println ( ( "<sp>factory:<sp>" + ( MockCoordinator . Factory . class . getName ( ) ) ) ) ; pw . close ( ) ; try { new com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator ( configPath ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( com . liveramp . hank . config . InvalidConfigurationException e ) { } pw = new java . io . PrintWriter ( new java . io . FileWriter ( configPath ) ) ; pw . println ( "coordinator:" ) ; pw . println ( ( "<sp>factory:<sp>" + ( MockCoordinator . Factory . class . getName ( ) ) ) ) ; pw . println ( "<sp>options:" ) ; pw . println ( "<sp>blah:<sp>blah" ) ; pw . close ( ) ; com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator conf = new com . liveramp . hank . config . yaml . TestYamlConfigurator . TestImplOfBaseYamlConfigurator ( configPath ) ; com . liveramp . hank . coordinator . Coordinator coordinator = conf . createCoordinator ( ) ; "<AssertPlaceHolder>" ; } createCoordinator ( ) { try { validate ( ) ; } catch ( com . liveramp . hank . config . InvalidConfigurationException e ) { throw new java . lang . RuntimeException ( "Configuration<sp>is<sp>invalid!" , e ) ; } java . lang . String factoryClassName = getString ( com . liveramp . hank . config . yaml . YamlCoordinatorConfigurator . COORDINATOR_SECTION_KEY , com . liveramp . hank . config . yaml . YamlCoordinatorConfigurator . COORDINATOR__FACTORY_KEY ) ; java . lang . Class < com . liveramp . hank . coordinator . CoordinatorFactory > factoryClass ; try { factoryClass = ( ( java . lang . Class < com . liveramp . hank . coordinator . CoordinatorFactory > ) ( java . lang . Class . forName ( factoryClassName ) ) ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( ( ( "Could<sp>not<sp>load<sp>coordinator<sp>factory<sp>class<sp>" + factoryClassName ) + "!" ) , e ) ; } com . liveramp . hank . coordinator . CoordinatorFactory factory ; try { factory = factoryClass . newInstance ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( ( ( "Could<sp>not<sp>get<sp>an<sp>instance<sp>of<sp>" + ( factoryClass . getName ( ) ) ) + "!" ) , e ) ; } return factory . getCoordinator ( getSection ( com . liveramp . hank . config . yaml . YamlCoordinatorConfigurator . COORDINATOR_SECTION_KEY , com . liveramp . hank . config . yaml . YamlCoordinatorConfigurator . COORDINATOR__OPTIONS_KEY ) ) ; }
org . junit . Assert . assertTrue ( ( coordinator instanceof com . liveramp . hank . coordinator . mock . MockCoordinator ) )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . Team > teams = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( teams . isEmpty ( ) )
testFalseNaam ( ) { setup ( true , false ) ; org . mockito . Mockito . when ( persoon . getAdministratienummer ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . ANUMMER ) ; org . mockito . Mockito . when ( persoon . getBurgerservicenummer ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BSN ) ; org . mockito . Mockito . when ( persoon . getDatumGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_DATUM . intValue ( ) ) ; org . mockito . Mockito . when ( persoon . getGemeenteGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_PLAATS ) ; org . mockito . Mockito . when ( persoon . getLandOfGebiedGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_LAND ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoonType = new nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . IdentificatienummersGroepType identificatieNummers = new nl . bzk . migratiebrp . bericht . model . sync . generated . IdentificatienummersGroepType ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . GeboorteGroepType geboorte = new nl . bzk . migratiebrp . bericht . model . sync . generated . GeboorteGroepType ( ) ; identificatieNummers . setANummer ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . ANUMMER ) ) ; identificatieNummers . setBurgerservicenummer ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BSN ) ) ; geboorte . setDatum ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_DATUM ) ; geboorte . setLand ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_LAND . getCode ( ) ) ) ; geboorte . setPlaats ( java . lang . String . valueOf ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_PLAATS . getCode ( ) ) ) ; persoonType . setIdentificatienummers ( identificatieNummers ) ; persoonType . setGeboorte ( geboorte ) ; verzoek . setPersoon ( persoonType ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoon = verzoek . getPersoon ( ) ; if ( persoon == null ) { return false ; } return rootPersoon . getPersoonOverlijdenHistorieSet ( ) . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) )
shouldConvertStringToId ( ) { org . openkilda . model . MeterId meterId = new org . openkilda . model . MeterId ( 291 ) ; org . openkilda . model . MeterId actualEntity = new org . openkilda . persistence . converters . MeterIdConverter ( ) . toEntityAttribute ( meterId . getValue ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( meterId , actualEntity )
testSetProgress ( ) { System . out . println ( "setProgress" ) ; double progressValue = 0.12 ; com . bixly . pastevid . screencap . components . progressbar . FFMpegProgressBarListener instance = new com . bixly . pastevid . screencap . components . progressbar . FFMpegProgressBarListener ( com . bixly . pastevid . screencap . components . progressbar . FFMpegProgressBarListenerTest . jprogressbar , 1 ) ; instance . setProgress ( progressValue ) ; "<AssertPlaceHolder>" ; } getProgress ( ) { return ( ( int ) ( ( ( double ) ( ( this . seconds ) * 100 ) ) / ( ( double ) ( this . duration ) ) ) ) ; }
org . junit . Assert . assertEquals ( ( ( int ) ( progressValue * 100 ) ) , instance . getProgress ( ) )
testIsInfoEnabledWithNoFilter ( ) { addNoFilter ( ) ; logger . setLevel ( Level . DEBUG ) ; "<AssertPlaceHolder>" ; } isInfoEnabled ( ) { return isInfoEnabled ( null ) ; }
org . junit . Assert . assertFalse ( logger . isInfoEnabled ( ) )
testLang303 ( ) { org . apache . commons . lang3 . time . DateParser parser = getInstance ( org . apache . commons . lang3 . time . FastDateParserTest . YMD_SLASH ) ; java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . set ( 2004 , 11 , 31 ) ; java . util . Date date = parser . parse ( "2004/11/31" ) ; parser = org . apache . commons . lang3 . SerializationUtils . deserialize ( org . apache . commons . lang3 . SerializationUtils . serialize ( ( ( java . io . Serializable ) ( parser ) ) ) ) ; "<AssertPlaceHolder>" ; } parse ( com . google . javascript . jscomp . AbstractCompiler ) { try { com . google . javascript . jscomp . JsAst . logger_ . fine ( ( "Parsing:<sp>" + ( sourceFile . getName ( ) ) ) ) ; com . google . javascript . jscomp . parsing . ParserRunner . ParseResult result = com . google . javascript . jscomp . parsing . ParserRunner . parse ( sourceFile , sourceFile . getCode ( ) , compiler . getParserConfig ( ) , compiler . getDefaultErrorReporter ( ) , com . google . javascript . jscomp . JsAst . logger_ ) ; root = result . ast ; compiler . setOldParseTree ( sourceFile . getName ( ) , result . oldAst ) ; } catch ( java . io . IOException e ) { compiler . report ( com . google . javascript . jscomp . JSError . make ( AbstractCompiler . READ_ERROR , sourceFile . getName ( ) ) ) ; } if ( ( ( root ) == null ) || ( compiler . hasHaltingErrors ( ) ) ) { root = com . google . javascript . rhino . IR . script ( ) ; } else { compiler . prepareAst ( root ) ; } root . setStaticSourceFile ( sourceFile ) ; }
org . junit . Assert . assertEquals ( date , parser . parse ( "2004/11/31" ) )
testSet ( ) { org . apache . tajo . common . type . IPv4 ip = null ; ip = new org . apache . tajo . common . type . IPv4 ( "255.255.255.255" ) ; byte [ ] b = new byte [ 4 ] ; for ( int i = 0 ; i < 4 ; i ++ ) { b [ i ] = ( ( byte ) ( 255 ) ) ; } org . apache . tajo . common . type . IPv4 ip2 = new org . apache . tajo . common . type . IPv4 ( b ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( ip , ip2 )
testGetLatestRunIdRunBySequencerPartitionContainerId ( ) { uk . ac . bbsrc . tgac . miso . core . data . Run run = dao . getLatestRunIdRunBySequencerPartitionContainerId ( 1L ) ; "<AssertPlaceHolder>" ; } getLatestRunIdRunBySequencerPartitionContainerId ( long ) { currentSession ( ) . flush ( ) ; org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . Run . class ) ; criteria . createAlias ( "runPositions" , "runPos" ) ; criteria . createAlias ( "runPos.container" , "spc" ) ; criteria . add ( org . hibernate . criterion . Restrictions . eq ( "spc.id" , containerId ) ) ; criteria . addOrder ( org . hibernate . criterion . Order . desc ( "id" ) ) ; criteria . setMaxResults ( 1 ) ; return ( ( uk . ac . bbsrc . tgac . miso . core . data . Run ) ( criteria . uniqueResult ( ) ) ) ; }
org . junit . Assert . assertNotNull ( run )
readGrib2Files ( ) { counterCurrent = ucar . nc2 . grib . TestCoordinatesMatchGbx . countersAll . makeSubCounters ( ) ; int fail = readAllDir ( ( ( ucar . unidata . util . test . TestDir . cdmUnitTestDir ) + "formats/grib2" ) , null , false ) ; ucar . nc2 . grib . TestCoordinatesMatchGbx . logger . debug ( "readGrib2Files<sp>=<sp>{}" , counterCurrent ) ; ucar . nc2 . grib . TestCoordinatesMatchGbx . countersAll . addTo ( counterCurrent ) ; "<AssertPlaceHolder>" ; } addTo ( ucar . nc2 . util . Counters$Counter ) { for ( Map . Entry < java . lang . Comparable , java . lang . Integer > entry : sub . set . entrySet ( ) ) { java . lang . Integer count = this . set . get ( entry . getKey ( ) ) ; if ( count == null ) count = 0 ; set . put ( entry . getKey ( ) , ( count + ( entry . getValue ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( 0 , fail )
testVoerRegelUitDatumEindeGevuldEnGeenDeelname ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; persoonBericht . setDeelnameEUVerkiezingen ( new nl . bzk . brp . model . bericht . kern . PersoonDeelnameEUVerkiezingenGroepBericht ( ) ) ; persoonBericht . getDeelnameEUVerkiezingen ( ) . setDatumVoorzienEindeUitsluitingEUVerkiezingen ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumAttribuut . vandaag ( ) ) ) ; persoonBericht . getDeelnameEUVerkiezingen ( ) . setIndicatieDeelnameEUVerkiezingen ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . JaNeeAttribuut ( false ) ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . deelnameeuverkiezingen . BRBY0133 ( ) . voerRegelUit ( null , persoonBericht , null , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . asset . kernel . model . AssetTag > assetTags = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( assetTags . isEmpty ( ) )
testGetSchemaWithValidAttributes ( ) { final long schemaId = 123456 ; final int version = 2 ; final int protocol = 1 ; final java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap ( ) ; attributes . put ( HortonworksAttributeSchemaReferenceStrategy . SCHEMA_ID_ATTRIBUTE , java . lang . String . valueOf ( schemaId ) ) ; attributes . put ( HortonworksAttributeSchemaReferenceStrategy . SCHEMA_VERSION_ATTRIBUTE , java . lang . String . valueOf ( version ) ) ; attributes . put ( HortonworksAttributeSchemaReferenceStrategy . SCHEMA_PROTOCOL_VERSION_ATTRIBUTE , java . lang . String . valueOf ( protocol ) ) ; final org . apache . nifi . schema . access . SchemaAccessStrategy schemaAccessStrategy = new org . apache . nifi . schema . access . HortonworksAttributeSchemaReferenceStrategy ( schemaRegistry ) ; final org . apache . nifi . serialization . record . SchemaIdentifier expectedSchemaIdentifier = org . apache . nifi . serialization . record . SchemaIdentifier . builder ( ) . id ( schemaId ) . version ( version ) . build ( ) ; when ( schemaRegistry . retrieveSchema ( argThat ( new org . apache . nifi . schema . access . SchemaIdentifierMatcher ( expectedSchemaIdentifier ) ) ) ) . thenReturn ( recordSchema ) ; final org . apache . nifi . serialization . record . RecordSchema retrievedSchema = schemaAccessStrategy . getSchema ( attributes , null , recordSchema ) ; "<AssertPlaceHolder>" ; } getSchema ( java . util . Map , java . io . InputStream , org . apache . nifi . serialization . record . RecordSchema ) { if ( ( this . context ) == null ) { throw new org . apache . nifi . schema . access . SchemaNotFoundException ( "Schema<sp>Access<sp>Strategy<sp>intended<sp>only<sp>for<sp>validation<sp>purposes<sp>and<sp>cannot<sp>obtain<sp>schema" ) ; } try { final org . apache . commons . csv . CSVFormat csvFormat = org . apache . nifi . csv . CSVUtils . createCSVFormat ( context ) . withFirstRecordAsHeader ( ) ; try ( final java . io . Reader reader = new java . io . InputStreamReader ( new org . apache . commons . io . input . BOMInputStream ( contentStream ) ) ; final org . apache . commons . csv . CSVParser csvParser = new org . apache . commons . csv . CSVParser ( reader , csvFormat ) ) { final java . util . List < org . apache . nifi . serialization . record . RecordField > fields = new java . util . ArrayList ( ) ; for ( final java . lang . String columnName : csvParser . getHeaderMap ( ) . keySet ( ) ) { fields . add ( new org . apache . nifi . serialization . record . RecordField ( columnName , RecordFieldType . STRING . getDataType ( ) , true ) ) ; } return new org . apache . nifi . serialization . SimpleRecordSchema ( fields ) ; } } catch ( final java . lang . Exception e ) { throw new org . apache . nifi . schema . access . SchemaNotFoundException ( "Failed<sp>to<sp>read<sp>Header<sp>line<sp>from<sp>CSV" , e ) ; } }
org . junit . Assert . assertNotNull ( retrievedSchema )
testAddQuotesIfNotExist_Case_4 ( ) { java . lang . String input = ( org . talend . core . utils . TalendQuoteUtilsTest . QUOTES ) + ( org . talend . core . utils . TalendQuoteUtilsTest . QUOTES ) ; java . lang . String expect = ( org . talend . core . utils . TalendQuoteUtilsTest . QUOTES ) + ( org . talend . core . utils . TalendQuoteUtilsTest . QUOTES ) ; java . lang . String ouput = org . talend . core . utils . TalendQuoteUtils . addQuotesIfNotExist ( input , org . talend . core . utils . TalendQuoteUtilsTest . QUOTES ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof org . talend . repository . items . importexport . handlers . model . ImportItem ) ) { return false ; } org . talend . repository . items . importexport . handlers . model . ImportItem other = ( ( org . talend . repository . items . importexport . handlers . model . ImportItem ) ( obj ) ) ; if ( ( this . path ) == null ) { if ( ( other . path ) != null ) { return false ; } } else if ( ! ( this . path . equals ( other . path ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( expect . equals ( ouput ) )
testCacheMiss_UnderlyingSuccessCacheSucceeded ( ) { when ( mMemoryCache . cache ( mPostprocessedBitmapCacheKey , mImageRef2 ) ) . thenReturn ( mImageRef2Clone ) ; com . facebook . imagepipeline . producers . Consumer consumer = performCacheMiss ( ) ; consumer . onNewResult ( mImageRef1 , Consumer . NO_FLAGS ) ; mImageRef1 . close ( ) ; consumer . onNewResult ( mImageRef2 , Consumer . IS_LAST ) ; mImageRef2 . close ( ) ; verify ( mConsumer ) . onNewResult ( mImageRef2Clone , Consumer . IS_LAST ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return ( com . facebook . common . references . CloseableReference . isValid ( mPooledByteBufferRef ) ) || ( ( mInputStreamSupplier ) != null ) ; }
org . junit . Assert . assertFalse ( mImageRef2Clone . isValid ( ) )
testNestedIterationWithArg ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "users" , "<users:{u<sp>|<sp><u.id:{id<sp>|<sp><id>=}><u.name>}>!" ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "users" , new org . stringtemplate . v4 . test . TestCoreBasics . User ( 1 , "parrt" ) ) ; st . add ( "users" , new org . stringtemplate . v4 . test . TestCoreBasics . User ( 2 , "tombu" ) ) ; st . add ( "users" , new org . stringtemplate . v4 . test . TestCoreBasics . User ( 3 , "sri" ) ) ; java . lang . String expected = "1=parrt2=tombu3=sri!" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testCalculateHash1 ( ) { final byte [ ] hash1 = org . oscm . authorization . PasswordHash . calculateHash ( 123456 , "secret" ) ; final byte [ ] hash2 = org . oscm . authorization . PasswordHash . calculateHash ( 123456 , "secret" ) ; "<AssertPlaceHolder>" ; } calculateHash ( long , java . lang . String ) { try { final java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; final java . io . DataOutputStream data = new java . io . DataOutputStream ( buffer ) ; data . writeLong ( salt ) ; data . writeUTF ( password ) ; final java . security . MessageDigest digest = java . security . MessageDigest . getInstance ( org . oscm . authorization . PasswordHash . ALGORITHM ) ; return digest . digest ( buffer . toByteArray ( ) ) ; } catch ( java . io . IOException e ) { throw new java . lang . AssertionError ( e ) ; } catch ( java . security . NoSuchAlgorithmException e ) { throw new java . lang . AssertionError ( e ) ; } }
org . junit . Assert . assertArrayEquals ( hash1 , hash2 )
testNullSegment ( ) { org . eclipse . tracecompass . tmf . remote . core . shell . ICommandInput input = new org . eclipse . tracecompass . internal . tmf . remote . core . shell . CommandInput ( ) ; input . add ( null ) ; "<AssertPlaceHolder>" ; } getInput ( ) { return fInputElement ; }
org . junit . Assert . assertEquals ( 0 , input . getInput ( ) . size ( ) )
whenJoinerWithPrefixSuffixWithEmptyValue_thenReturnDefault ( ) { java . util . StringJoiner commaSeparatedPrefixSuffixJoiner = new java . util . StringJoiner ( DELIMITER_COMMA , PREFIX , SUFFIX ) ; commaSeparatedPrefixSuffixJoiner . setEmptyValue ( EMPTY_JOINER ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "Movie<sp>[imdbId=" + ( imdbId ) ) + ",<sp>director=" ) + ( director ) ) + ",<sp>actors=" ) + ( actors ) ) + "]" ; }
org . junit . Assert . assertEquals ( commaSeparatedPrefixSuffixJoiner . toString ( ) , EMPTY_JOINER )
passthroughInboundDocSubmission ( ) { oasis . names . tc . ebxml_regrep . xsd . rs . _3 . RegistryResponseType expectedResponse = new oasis . names . tc . ebxml_regrep . xsd . rs . _3 . RegistryResponseType ( ) ; gov . hhs . fha . nhinc . docsubmission . adapter . proxy . AdapterDocSubmissionProxy adapterProxy = mock ( gov . hhs . fha . nhinc . docsubmission . adapter . proxy . AdapterDocSubmissionProxy . class ) ; when ( adapterFactory . getAdapterDocSubmissionProxy ( ) ) . thenReturn ( adapterProxy ) ; when ( adapterProxy . provideAndRegisterDocumentSetB ( request , assertion ) ) . thenReturn ( expectedResponse ) ; gov . hhs . fha . nhinc . docsubmission . inbound . PassthroughInboundDocSubmission passthroughDocSubmission = new gov . hhs . fha . nhinc . docsubmission . inbound . PassthroughInboundDocSubmission ( adapterFactory , getAuditLogger ( true ) , dsUtils ) ; oasis . names . tc . ebxml_regrep . xsd . rs . _3 . RegistryResponseType actualResponse = passthroughDocSubmission . documentRepositoryProvideAndRegisterDocumentSetB ( request , assertion , webContextProperties ) ; "<AssertPlaceHolder>" ; verify ( mockEJBLogger ) . auditResponseMessage ( eq ( request ) , eq ( actualResponse ) , eq ( assertion ) , isNull ( gov . hhs . fha . nhinc . common . nhinccommon . NhinTargetSystemType . class ) , eq ( NhincConstants . AUDIT_LOG_INBOUND_DIRECTION ) , eq ( NhincConstants . AUDIT_LOG_NHIN_INTERFACE ) , eq ( Boolean . FALSE ) , eq ( webContextProperties ) , eq ( NhincConstants . NHINC_XDR_SERVICE_NAME ) , any ( gov . hhs . fha . nhinc . docsubmission . audit . transform . DocSubmissionAuditTransforms . class ) ) ; } documentRepositoryProvideAndRegisterDocumentSetB ( ihe . iti . xds_b . _2007 . ProvideAndRegisterDocumentSetRequestType , gov . hhs . fha . nhinc . common . nhinccommon . AssertionType , java . util . Properties ) { return super . documentRepositoryProvideAndRegisterDocumentSetB ( body , assertion , webContextProperties ) ; }
org . junit . Assert . assertSame ( expectedResponse , actualResponse )
testSearchBigBytes_500K ( ) { org . riversun . finbin . BigBinarySearcher bbs = new org . riversun . finbin . BigBinarySearcher ( ) ; byte [ ] srcBytes = org . riversun . finbin . BinaryUtil . loadBytesFromFile ( new java . io . File ( "src/test/resources/finbin_test_500kbyte.bin" ) ) ; java . lang . String searchText = "hello<sp>world" ; byte [ ] searchBytes = getBytes ( searchText ) ; java . lang . Integer [ ] expectedArray = new java . lang . Integer [ ] { 0 , 50000 , 100000 , 150000 , 200000 , 250000 , 300000 , 350000 , 400000 , 450000 , 500000 } ; startTimer ( ) ; java . util . List < java . lang . Integer > resultList = bbs . searchBigBytes ( srcBytes , searchBytes ) ; long ellapsedTimeInMillis = stopTimer ( ) ; java . lang . Integer [ ] resultArray = resultList . toArray ( new java . lang . Integer [ ] { } ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( ( ( "[" + ( name . getMethodName ( ) ) ) + "]<sp>ellapsed<sp>" ) + ellapsedTimeInMillis ) + "<sp>millis<sp>for<sp>" ) + ( ( srcBytes . length ) / 1024 ) ) + "<sp>kbytes" ) ) ; } stopTimer ( ) { org . riversun . finbin . TestBase . stopTime = java . lang . System . currentTimeMillis ( ) ; return ( org . riversun . finbin . TestBase . stopTime ) - ( org . riversun . finbin . TestBase . startTime ) ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expectedArray , resultArray ) )
null_selector__should_return_EMPTY_element_set ( ) { io . github . seleniumquery . SeleniumQueryObject targetSQO = testinfrastructure . testdouble . io . github . seleniumquery . SeleniumQueryObjectMother . createStubSeleniumQueryObjectWithAtLeastOneElement ( ) ; io . github . seleniumquery . SeleniumQueryObject resultSQO = filterSelectorFunction . filter ( targetSQO , io . github . seleniumquery . functions . jquery . traversing . filtering . filterfunction . FilterSelectorFunctionTest . NULL_SELECTOR ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( ( webDriver ) == null ) { webDriver = this . driverBuilder . build ( ) ; this . setDriverTimeout ( ) ; } return webDriver ; }
org . junit . Assert . assertThat ( resultSQO . get ( ) , empty ( ) )
testGetCanonicalServiceNameWithNonDefaultMountTable ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; org . apache . hadoop . fs . viewfs . ConfigUtil . addLink ( conf , org . apache . hadoop . fs . viewfs . TestViewFileSystemDelegationTokenSupport . MOUNT_TABLE_NAME , "/user" , new java . net . URI ( "file:///" ) ) ; org . apache . hadoop . fs . FileSystem viewFs = org . apache . hadoop . fs . FileSystem . get ( new java . net . URI ( ( ( ( org . apache . hadoop . fs . FsConstants . VIEWFS_SCHEME ) + "://" ) + ( org . apache . hadoop . fs . viewfs . TestViewFileSystemDelegationTokenSupport . MOUNT_TABLE_NAME ) ) ) , conf ) ; java . lang . String serviceName = viewFs . getCanonicalServiceName ( ) ; "<AssertPlaceHolder>" ; } getCanonicalServiceName ( ) { throw new java . lang . UnsupportedOperationException ( ( "Ozone<sp>REST<sp>protocol<sp>does<sp>not<sp>" + "support<sp>this<sp>operation." ) ) ; }
org . junit . Assert . assertNull ( serviceName )
testFitsUndefinedHdu2 ( ) { nom . tam . fits . Fits fits1 = makeAsciiTable ( ) ; fits1 . read ( ) ; byte [ ] undefinedData = new byte [ 1000 ] ; for ( int index = 0 ; index < ( undefinedData . length ) ; index ++ ) { undefinedData [ index ] = ( ( byte ) ( index ) ) ; } nom . tam . fits . Data data = nom . tam . fits . UndefinedHDU . encapsulate ( undefinedData ) ; nom . tam . fits . Header header = nom . tam . fits . UndefinedHDU . manufactureHeader ( data ) ; fits1 . addHDU ( nom . tam . fits . FitsFactory . HDUFactory ( header , data ) ) ; nom . tam . util . BufferedDataOutputStream os = new nom . tam . util . BufferedDataOutputStream ( new java . io . FileOutputStream ( "target/UndefindedHDU2.fits" ) ) ; fits1 . write ( os ) ; os . close ( ) ; nom . tam . fits . Fits fits2 = new nom . tam . fits . Fits ( "target/UndefindedHDU2.fits" ) ; nom . tam . fits . BasicHDU < ? > [ ] hdus = fits2 . read ( ) ; byte [ ] rereadUndefinedData = ( ( byte [ ] ) ( ( ( nom . tam . fits . UndefinedData ) ( hdus [ ( ( hdus . length ) - 1 ) ] . getData ( ) ) ) . getData ( ) ) ) ; "<AssertPlaceHolder>" ; } getData ( ) { throw new java . lang . IllegalStateException ( ) ; }
org . junit . Assert . assertArrayEquals ( undefinedData , rereadUndefinedData )
testOneEdgeTooRecent ( ) { long halfDaysPriorBenchmark = ( benchmarkTimeInMillis ) - ( ( oneDayInMillis ) / 2 ) ; com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap socialProof = new com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap ( ) ; socialProof . put ( 100L , 1.0 , halfDaysPriorBenchmark ) ; com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap [ ] socialProofs = new com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap [ ] { null , null , null , null , socialProof } ; long elapsedTimeInMillis = ( java . lang . System . currentTimeMillis ( ) ) - ( benchmarkTimeInMillis ) ; com . twitter . graphjet . algorithms . filters . RecentEdgeMetadataFilter filter = new com . twitter . graphjet . algorithms . filters . RecentEdgeMetadataFilter ( ( elapsedTimeInMillis + ( oneDayInMillis ) ) , ( ( byte ) ( com . twitter . graphjet . algorithms . RecommendationRequest . AUTHOR_SOCIAL_PROOF_TYPE ) ) , new com . twitter . graphjet . stats . NullStatsReceiver ( ) ) ; "<AssertPlaceHolder>" ; } filterResult ( long , com . twitter . graphjet . hashing . SmallArrayBasedLongToDoubleMap [ ] ) { if ( ( resultFilterList . size ( ) ) == 0 ) { return false ; } for ( com . twitter . graphjet . algorithms . filters . ResultFilter filter : resultFilterList ) { if ( ! ( filter . filterResult ( resultNode , socialProofs ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertEquals ( true , filter . filterResult ( 1L , socialProofs ) )
testSuccess ( ) { int exitCode = executeAsFile ( new java . lang . String [ ] { org . jboss . additional . testsuite . jdkall . past . eap_6_4_x . management . cli . FileArgumentTestCase . SET_PROP_COMMAND } , true ) ; if ( exitCode == 0 ) { executeAsFile ( new java . lang . String [ ] { org . jboss . additional . testsuite . jdkall . past . eap_6_4_x . management . cli . FileArgumentTestCase . REMOVE_PROP_COMMAND } , true ) ; } "<AssertPlaceHolder>" ; } executeAsFile ( java . lang . String [ ] , boolean ) { createFile ( cmd ) ; return execute ( org . jboss . additional . testsuite . jdkall . past . eap_6_4_x . management . cli . FileArgumentTestCase . TMP_FILE , logFailure ) ; }
org . junit . Assert . assertEquals ( 0 , exitCode )
givenLinkedHashMap_whenGetsOrderedKeyset_thenCorrect ( ) { com . baeldung . java . map . LinkedHashMap < java . lang . Integer , java . lang . String > map = new com . baeldung . java . map . LinkedHashMap ( ) ; map . put ( 1 , null ) ; map . put ( 2 , null ) ; map . put ( 3 , null ) ; map . put ( 4 , null ) ; map . put ( 5 , null ) ; com . baeldung . java . map . Set < java . lang . Integer > keys = map . keySet ( ) ; java . lang . Integer [ ] arr = keys . toArray ( new java . lang . Integer [ 0 ] ) ; for ( int i = 0 ; i < ( arr . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } toArray ( T [ ] ) { return cookieMap . values ( ) . toArray ( ts ) ; }
org . junit . Assert . assertEquals ( new java . lang . Integer ( ( i + 1 ) ) , arr [ i ] )
testSaltedAuthenticationInfo ( ) { org . apache . shiro . authc . credential . HashedCredentialsMatcher matcher = new org . apache . shiro . authc . credential . HashedCredentialsMatcher ( org . apache . shiro . crypto . hash . Sha1Hash . ALGORITHM_NAME ) ; org . apache . shiro . util . ByteSource salt = new org . apache . shiro . crypto . SecureRandomNumberGenerator ( ) . nextBytes ( ) ; java . lang . Object hashedPassword = new org . apache . shiro . crypto . hash . Sha1Hash ( "password" , salt ) ; org . apache . shiro . authc . SimpleAuthenticationInfo account = new org . apache . shiro . authc . SimpleAuthenticationInfo ( "username" , hashedPassword , salt , "realmName" ) ; org . apache . shiro . authc . AuthenticationToken token = new org . apache . shiro . authc . UsernamePasswordToken ( "username" , "password" ) ; "<AssertPlaceHolder>" ; } doCredentialsMatch ( org . apache . shiro . authc . AuthenticationToken , org . apache . shiro . authc . AuthenticationInfo ) { org . apache . shiro . authc . credential . PasswordService service = ensurePasswordService ( ) ; java . lang . Object submittedPassword = getSubmittedPassword ( token ) ; java . lang . Object storedCredentials = getStoredPassword ( info ) ; assertStoredCredentialsType ( storedCredentials ) ; if ( storedCredentials instanceof org . apache . shiro . crypto . hash . Hash ) { org . apache . shiro . crypto . hash . Hash hashedPassword = ( ( org . apache . shiro . crypto . hash . Hash ) ( storedCredentials ) ) ; org . apache . shiro . authc . credential . HashingPasswordService hashingService = assertHashingPasswordService ( service ) ; return hashingService . passwordsMatch ( submittedPassword , hashedPassword ) ; } java . lang . String formatted = ( ( java . lang . String ) ( storedCredentials ) ) ; return passwordService . passwordsMatch ( submittedPassword , formatted ) ; }
org . junit . Assert . assertTrue ( matcher . doCredentialsMatch ( token , account ) )
shouldAcceptValidMetadataObject ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( metadata , HttpRequestType . POST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( result . passedValidation ( ) )
shouldParsePicklistsToObjectsFail ( ) { final int properCountExceptions = 2 ; final java . lang . String [ ] invalidPicklistToStrings = new java . lang . String [ ] { "Account,DataSource" } ; final java . lang . String [ ] invalidPicklistToEnums = new java . lang . String [ ] { "Con-tact.Contact_Source_Information__c" } ; final org . apache . camel . maven . GenerateMojo mojo = new org . apache . camel . maven . GenerateMojo ( ) ; mojo . picklistToStrings = invalidPicklistToStrings ; mojo . picklistToEnums = invalidPicklistToEnums ; int resultCountExceptions = 0 ; try { mojo . parsePicklistToEnums ( ) ; } catch ( final java . lang . IllegalArgumentException e ) { resultCountExceptions ++ ; } try { mojo . parsePicklistToStrings ( ) ; } catch ( final java . lang . IllegalArgumentException e ) { resultCountExceptions ++ ; } "<AssertPlaceHolder>" ; } parsePicklistToStrings ( ) { org . apache . camel . maven . GenerateMojo . parsePicklistOverrideArgs ( picklistToStrings , picklistsStringToSObject ) ; }
org . junit . Assert . assertEquals ( properCountExceptions , resultCountExceptions )
addPass ( ) { final org . apache . commons . collections4 . collection . PredicatedCollection . Builder < java . lang . String > builder = org . apache . commons . collections4 . collection . PredicatedCollection . notNullBuilder ( ) ; builder . add ( "test" ) ; "<AssertPlaceHolder>" ; } createPredicatedList ( ) { return createPredicatedList ( new java . util . ArrayList < E > ( ) ) ; }
org . junit . Assert . assertEquals ( builder . createPredicatedList ( ) . size ( ) , 1 )
shouldThrowExceptionIfGraphIdAndTableNameAreProvidedAndDifferent ( ) { final uk . gov . gchq . gaffer . hbasestore . HBaseProperties properties = uk . gov . gchq . gaffer . hbasestore . HBaseProperties . loadStoreProperties ( uk . gov . gchq . gaffer . commonutil . StreamUtil . storeProps ( uk . gov . gchq . gaffer . hbasestore . HBaseStoreTest . class ) ) ; properties . setTable ( "tableName" ) ; final uk . gov . gchq . gaffer . hbasestore . SingleUseMiniHBaseStore store = new uk . gov . gchq . gaffer . hbasestore . SingleUseMiniHBaseStore ( ) ; try { store . initialise ( "graphId" , uk . gov . gchq . gaffer . hbasestore . HBaseStoreTest . SCHEMA , properties ) ; org . junit . Assert . fail ( "Exception<sp>expected" ) ; } catch ( final java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return ( ( ( ( super . getMessage ( ) ) + "<sp>in<sp>string<sp>\'" ) + ( this . visibility ) ) + "\'<sp>at<sp>position<sp>" ) + ( super . getErrorOffset ( ) ) ; }
org . junit . Assert . assertNotNull ( e . getMessage ( ) )
shouldNavigateCommitWithMultiplePages ( ) { javax . jcr . Node commit = session . getNode ( "/repos/git-modeshape-remote/commits/d1f7daf32bd67edded7545221cd5c79d94813310" ) ; "<AssertPlaceHolder>" ; javax . jcr . NodeIterator childrenIterator = commit . getNodes ( ) ; while ( childrenIterator . hasNext ( ) ) { childrenIterator . nextNode ( ) ; } } getNode ( java . lang . String ) { return session ( ) . getNode ( string ) ; }
org . junit . Assert . assertNotNull ( commit )
testNoTransaction_SAMPLED_CONTINUATION ( ) { final long expectedTransactionCount = 0L ; final long actualCount = this . transactionCounter . getSampledContinuationCount ( ) ; "<AssertPlaceHolder>" ; } getSampledContinuationCount ( ) { return ( java . lang . Math . abs ( ( ( idGenerator . currentContinuedTransactionId ( ) ) - ( AtomicIdGenerator . INITIAL_CONTINUED_TRANSACTION_ID ) ) ) ) / ( AtomicIdGenerator . DECREMENT_CYCLE ) ; }
org . junit . Assert . assertEquals ( expectedTransactionCount , actualCount )
testCount_noQuery_defaultDirection ( ) { org . calrissian . accumulorecipes . thirdparty . tinkerpop . model . EntityVertex v1 = ( ( org . calrissian . accumulorecipes . thirdparty . tinkerpop . model . EntityVertex ) ( graph . getVertex ( org . calrissian . accumulorecipes . thirdparty . tinkerpop . EntityVertexQueryIT . entityIndex ( vertex1 ) ) ) ) ; "<AssertPlaceHolder>" ; } query ( ) { return new org . calrissian . accumulorecipes . thirdparty . tinkerpop . query . EntityGraphQuery ( graphStore , vertexTypes , edgeTypes , auths ) ; }
org . junit . Assert . assertEquals ( 3 , v1 . query ( ) . count ( ) )
testValidName ( ) { java . lang . String name = "My1stExperiment" ; final io . rtr . alchemy . models . Experiment experiment = new io . rtr . alchemy . models . Experiment ( experiments , name ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( experiment . getName ( ) , name )
testNotEqualsPos ( ) { edu . ucla . sspace . dependency . DependencyTreeNode node1 = new edu . ucla . sspace . dependency . SimpleDependencyTreeNode ( "cat" , "n" , "c" , 0 ) ; edu . ucla . sspace . dependency . DependencyTreeNode node2 = new edu . ucla . sspace . dependency . SimpleDependencyTreeNode ( "cat" , "v" , "c" , 0 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return o instanceof org . tartarus . snowball . ext . portugueseStemmer ; }
org . junit . Assert . assertFalse ( node1 . equals ( node2 ) )
exitCodeIsMinusTwoWhenOneReplicationFails ( ) { doThrow ( new java . lang . RuntimeException ( ) ) . when ( replication2 ) . replicate ( ) ; locomotive . run ( applicationArguments ) ; "<AssertPlaceHolder>" ; } getExitCode ( ) { if ( ( replicationFailures ) == ( tableReplications . size ( ) ) ) { return - 1 ; } if ( ( replicationFailures ) > 0 ) { return - 2 ; } return 0 ; }
org . junit . Assert . assertThat ( locomotive . getExitCode ( ) , org . hamcrest . CoreMatchers . is ( ( - 2 ) ) )
testAlternatiefPadMVGeboorteBerichtStatusCodeFout ( ) { final nl . moderniseringgba . isc . esb . message . lo3 . impl . Tb01Bericht tb01Bericht = createTb01Bericht ( ) ; final nl . moderniseringgba . isc . esb . message . brp . impl . MvGeboorteVerzoekBericht mvGeboorteVerzoekBericht = happyFlowTotMvGeboorteAntwoordBericht ( tb01Bericht ) ; final nl . moderniseringgba . isc . esb . message . brp . generated . MvGeboorteAntwoordType antwoordType = new nl . moderniseringgba . isc . esb . message . brp . generated . MvGeboorteAntwoordType ( ) ; antwoordType . setANummer ( "1234567898" ) ; antwoordType . setStatus ( StatusType . FOUT ) ; antwoordType . setToelichting ( "Er<sp>is<sp>iets<sp>fout<sp>gegaan...<sp>niet<sp>bekend<sp>wat<sp>;-)" ) ; final nl . moderniseringgba . isc . esb . message . brp . impl . MvGeboorteAntwoordBericht mvGeboorteAntwoordBericht = new nl . moderniseringgba . isc . esb . message . brp . impl . MvGeboorteAntwoordBericht ( antwoordType ) ; mvGeboorteAntwoordBericht . setCorrelationId ( mvGeboorteVerzoekBericht . getMessageId ( ) ) ; signalBrp ( mvGeboorteAntwoordBericht ) ; checkPf03EnVb01Berichten ( tb01Bericht ) ; "<AssertPlaceHolder>" ; } processEnded ( ) { final org . jbpm . JbpmContext jbpmContext = org . jbpm . JbpmConfiguration . getInstance ( ) . createJbpmContext ( ) ; try { final org . jbpm . graph . exe . ProcessInstance processInstance = jbpmContext . loadProcessInstance ( processInstanceId ) ; return processInstance . hasEnded ( ) ; } finally { jbpmContext . close ( ) ; } }
org . junit . Assert . assertTrue ( processEnded ( ) )
testJumbuneException_1 ( ) { org . jumbune . utils . exception . ErrorCodesAndMessages errorCodeAndMessage = org . jumbune . utils . exception . ErrorCodesAndMessages . COULD_NOT_CREATE_DIRECTORY ; org . jumbune . utils . exception . JumbuneException result = new org . jumbune . utils . exception . JumbuneException ( errorCodeAndMessage ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( result )
test20 ( ) { byte [ ] expected = new byte [ ] { ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) } ; java . lang . String str = new java . lang . String ( "" ) ; "<AssertPlaceHolder>" ; } build_fixed_str ( long , java . lang . String ) { return com . github . mpjct . jmpjct . mysql . proto . Proto . build_fixed_str ( ( ( int ) ( size ) ) , str ) ; }
org . junit . Assert . assertArrayEquals ( expected , com . github . mpjct . jmpjct . mysql . proto . Proto . build_fixed_str ( 3 , str ) )
testServiceLookup ( ) { org . nuxeo . runtime . services . event . EventService eventComponent = ( ( org . nuxeo . runtime . services . event . EventService ) ( org . nuxeo . runtime . api . Framework . getRuntime ( ) . getComponent ( EventService . NAME ) ) ) ; org . nuxeo . runtime . services . event . EventService eventService = org . nuxeo . runtime . api . Framework . getRuntime ( ) . getService ( org . nuxeo . runtime . services . event . EventService . class ) ; "<AssertPlaceHolder>" ; } getService ( org . apache . chemistry . opencmis . commons . server . CallContext ) { java . lang . String repositoryId = context . getRepositoryId ( ) ; if ( org . apache . commons . lang3 . StringUtils . isBlank ( repositoryId ) ) { repositoryId = null ; } else { org . nuxeo . ecm . core . opencmis . impl . server . NuxeoRepository repository = org . nuxeo . runtime . api . Framework . getService ( org . nuxeo . ecm . core . opencmis . impl . server . NuxeoRepositories . class ) . getRepository ( repositoryId ) ; if ( repository == null ) { throw new org . apache . chemistry . opencmis . commons . exceptions . CmisInvalidArgumentException ( ( "No<sp>such<sp>repository:<sp>" + repositoryId ) ) ; } } org . nuxeo . ecm . core . opencmis . impl . server . NuxeoCmisService nuxeoCmisService = new org . nuxeo . ecm . core . opencmis . impl . server . NuxeoCmisService ( repositoryId ) ; org . apache . chemistry . opencmis . server . support . wrapper . CallContextAwareCmisService service = ( ( org . apache . chemistry . opencmis . server . support . wrapper . CallContextAwareCmisService ) ( wrapperManager . wrap ( nuxeoCmisService ) ) ) ; service . setCallContext ( context ) ; return service ; }
org . junit . Assert . assertSame ( eventComponent , eventService )
testGetDatasetQueryEmpty ( ) { metadata . setDataset ( true ) ; org . mockito . Mockito . when ( fieldBean . getFields ( metadata ) ) . thenReturn ( fields ) ; org . mockito . Mockito . when ( chunkBean . get ( metadata , 1 ) ) . thenReturn ( result ) ; org . mockito . Mockito . when ( parameterMap . containsKey ( "query" ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( parameterMap . getFirst ( "query" ) ) . thenReturn ( "" ) ; javax . ws . rs . core . Response response = browseResource . getDataset ( "xml" , metadata . getLocation ( ) ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
getObservations_shouldGetAllObsAssignedToGivenEncounters ( ) { org . openmrs . api . ObsService obsService = org . openmrs . api . context . Context . getObsService ( ) ; java . util . List < org . openmrs . Obs > obss = obsService . getObservations ( null , java . util . Collections . singletonList ( new org . openmrs . Encounter ( 4 ) ) , null , null , null , null , null , null , null , null , null , false , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 6 , obss . size ( ) )