input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
test ( ) { exit . expectSystemExit ( ) ; exit . checkAssertionAfterwards ( new org . junit . contrib . java . lang . system . Assertion ( ) { public void checkAssertion ( ) throws org . junit . contrib . java . lang . system . Exception { "<AssertPlaceHolder>" ; } } ) ; java . lang . System . System . exit ( 0 ) ; } checkAssertion ( ) { org . junit . Assert . assertEquals ( "exit<sp>..." , AppWithExit . message ) ; }
org . junit . Assert . assertTrue ( true )
testOutsideString ( ) { org . hibernate . checkstyle . checks . regexp . StringSuppressor suppressor = new org . hibernate . checkstyle . checks . regexp . StringSuppressor ( ) ; suppressor . setCurrentContents ( content ( "<sp>" ) ) ; "<AssertPlaceHolder>" ; } shouldSuppress ( int , int , int , int ) { return false ; }
org . junit . Assert . assertFalse ( suppressor . shouldSuppress ( 1 , 0 , 0 , 1 ) )
generate_A$String ( ) { java . lang . String sessionId = "a" ; java . lang . String namespace = "b" ; com . m3 . globalsession . StoreKeyGenerator target = new com . m3 . globalsession . StoreKeyGenerator ( sessionId , namespace ) ; java . lang . String name = "c" ; java . lang . String actual = target . generate ( name ) ; java . lang . String expected = "GlobalSession::a::b::c" ; "<AssertPlaceHolder>" ; } generate ( java . lang . String ) { return ( ( ( ( "GlobalSession::" + ( sessionId ) ) + "::" ) + ( namespace ) ) + "::" ) + name ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testReadByteArray1 ( ) { byte [ ] readBytes = com . predic8 . membrane . core . util . ByteUtil . readByteArray ( in1 , com . predic8 . membrane . core . util . ByteUtilTest . message1 . length ( ) ) ; "<AssertPlaceHolder>" ; } readByteArray ( java . io . InputStream , int ) { if ( length < 0 ) return com . predic8 . membrane . core . util . ByteUtil . getByteArrayData ( in ) ; byte [ ] content = new byte [ length ] ; int offset = 0 ; int count = 0 ; while ( ( offset < length ) && ( ( count = in . read ( content , offset , ( length - offset ) ) ) >= 0 ) ) { offset += count ; } return content ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( readBytes , com . predic8 . membrane . core . util . ByteUtilTest . message1 . getBytes ( ) ) )
remembers_objname ( ) { final com . groupon . lex . metrics . jmx . MBeanGroup mbg = new com . groupon . lex . metrics . jmx . MBeanGroup ( obj_name , com . groupon . lex . metrics . resolver . NamedResolverMap . EMPTY ) ; "<AssertPlaceHolder>" ; } getMonitoredMBeanName ( ) { return obj_name_ ; }
org . junit . Assert . assertEquals ( obj_name , mbg . getMonitoredMBeanName ( ) )
shouldUnwrapEntityIds ( ) { final uk . gov . gchq . gaffer . data . element . id . EntityId value = mock ( uk . gov . gchq . gaffer . data . element . id . EntityId . class ) ; final java . lang . Object vertex = mock ( java . lang . Object . class ) ; given ( value . getVertex ( ) ) . willReturn ( vertex ) ; final uk . gov . gchq . gaffer . data . element . function . UnwrapEntityId function = new uk . gov . gchq . gaffer . data . element . function . UnwrapEntityId ( ) ; final java . lang . Object result = function . apply ( value ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . Object ) { if ( null == value ) { return null ; } if ( value instanceof java . lang . Number ) { return ( ( java . lang . Number ) ( value ) ) . intValue ( ) ; } if ( value instanceof java . lang . String ) { return java . lang . Integer . valueOf ( ( ( java . lang . String ) ( value ) ) ) ; } throw new java . lang . IllegalArgumentException ( ( "Could<sp>not<sp>convert<sp>value<sp>to<sp>Integer:<sp>" + value ) ) ; }
org . junit . Assert . assertSame ( vertex , result )
testStoreWithFilterReturnsFalse ( ) { final java . nio . file . PathMatcher filter = org . mockito . Mockito . mock ( java . nio . file . PathMatcher . class ) ; org . mockito . Mockito . when ( entry . store ( org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . same ( filter ) ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( entry ) . store ( org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . same ( filter ) ) ; } store ( org . codice . ddf . util . function . BiThrowingConsumer ) { org . apache . commons . lang . Validate . notNull ( consumer , "invalid<sp>null<sp>consumer" ) ; if ( ( stored ) == null ) { this . stored = false ; try ( final java . io . OutputStream os = getOutputStream ( ) ) { this . stored = getReport ( ) . wasIOSuccessful ( ( ) -> consumer . accept ( getReport ( ) , os ) ) ; } catch ( org . codice . ddf . configuration . migration . ExportIOException e ) { throw newError ( org . codice . ddf . configuration . migration . ExportMigrationEntryImpl . FAILED_TO_BE_EXPORTED , e . getCause ( ) ) ; } catch ( java . io . IOException e ) { getReport ( ) . record ( newError ( org . codice . ddf . configuration . migration . ExportMigrationEntryImpl . FAILED_TO_BE_EXPORTED , e ) ) ; } catch ( org . codice . ddf . migration . MigrationException e ) { throw e ; } } return stored ; }
org . junit . Assert . assertThat ( entry . store ( filter ) , org . hamcrest . Matchers . equalTo ( false ) )
whenAddInConatainerThenAddInArray ( ) { ru . szhernovoy . list . DynamicArray < java . lang . String > container = new ru . szhernovoy . list . DynamicArray ( ) ; container . add ( "First<sp>message" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . lang . String text = null ; if ( this . cache . containsKey ( key ) ) { text = this . cache . get ( key ) . get ( ) ; if ( text == null ) { addValueInCache ( key ) ; } } else { addValueInCache ( key ) ; text = this . cache . get ( key ) . get ( ) ; } return text ; }
org . junit . Assert . assertThat ( "First<sp>message" , org . hamcrest . core . Is . is ( container . get ( 0 ) ) )
testResolveAPIVersionFromSysProp ( ) { org . cloudifysource . shell . rest . APIVersionResolver fixture = new org . cloudifysource . shell . rest . APIVersionResolver ( ) ; final java . lang . String sysPropBefore = java . lang . System . getProperty ( CloudifyConstants . SYSTEM_PROPERTY_CLI_REST_API_VERSION ) ; java . lang . String value = "10.0.0" ; java . lang . System . setProperty ( CloudifyConstants . SYSTEM_PROPERTY_CLI_REST_API_VERSION , value ) ; java . lang . String result = fixture . resolveAPIVersion ( ) ; try { "<AssertPlaceHolder>" ; } finally { if ( sysPropBefore == null ) { java . lang . System . clearProperty ( CloudifyConstants . SYSTEM_PROPERTY_CLI_REST_API_VERSION ) ; } else { java . lang . System . setProperty ( CloudifyConstants . SYSTEM_PROPERTY_CLI_REST_API_VERSION , sysPropBefore ) ; } } } resolveAPIVersion ( ) { final java . lang . String sysprop = java . lang . System . getProperty ( CloudifyConstants . SYSTEM_PROPERTY_CLI_REST_API_VERSION ) ; if ( sysprop != null ) { return sysprop ; } final java . lang . String platformVersion = com . j_spaces . kernel . PlatformVersion . getVersion ( ) ; return platformVersion ; }
org . junit . Assert . assertEquals ( value , result )
addAssertionKeyNotMatching ( ) { org . talend . esb . servicelocator . client . SLPropertiesMatcher matcher = new org . talend . esb . servicelocator . client . SLPropertiesMatcher ( ) ; matcher . addAssertion ( org . talend . esb . servicelocator . TestValues . NAME_3 , org . talend . esb . servicelocator . TestValues . VALUE_1 ) ; "<AssertPlaceHolder>" ; } isMatching ( org . talend . esb . servicelocator . client . SLProperties ) { for ( Map . Entry < java . lang . String , java . lang . String > matcher : matchers ) { if ( ! ( properties . includesValues ( matcher . getKey ( ) , matcher . getValue ( ) ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertFalse ( matcher . isMatching ( properties ) )
asString_3 ( ) { java . lang . String x = org . apache . jena . atlas . iterator . Iter . asString ( data1 , "/" ) ; "<AssertPlaceHolder>" ; } asString ( org . apache . jena . sparql . path . Path , org . apache . jena . sparql . core . Prologue ) { org . apache . jena . atlas . io . IndentedLineBuffer buff = new org . apache . jena . atlas . io . IndentedLineBuffer ( ) ; org . apache . jena . sparql . path . PathWriter . PathWriterWorker w = new org . apache . jena . sparql . path . PathWriter . PathWriterWorker ( buff , prologue ) ; path . visit ( w ) ; w . out . flush ( ) ; return buff . asString ( ) ; }
org . junit . Assert . assertEquals ( "a" , x )
testJsonToEntity ( ) { java . util . List < com . google . datastore . v1 . Entity > noProject = entities . stream ( ) . map ( ( entity ) -> { return com . google . datastore . v1 . Entity . newBuilder ( ) . setKey ( com . google . datastore . v1 . Key . newBuilder ( ) . setPartitionId ( com . google . datastore . v1 . PartitionId . newBuilder ( ) . setNamespaceId ( entity . getKey ( ) . getPartitionId ( ) . getNamespaceId ( ) ) . build ( ) ) . addAllPath ( entity . getKey ( ) . getPathList ( ) ) ) . putAllProperties ( entity . getPropertiesMap ( ) ) . build ( ) ; } ) . collect ( java . util . stream . Collectors . toList ( ) ) ; java . util . List < com . google . datastore . v1 . Entity > entities = org . apache . beam . sdk . transforms . DoFnTester . of ( new com . google . cloud . teleport . templates . common . DatastoreConverters . JsonToEntity ( ) ) . processBundle ( entitiesJson ) ; "<AssertPlaceHolder>" ; } of ( com . google . cloud . teleport . values . FailsafeElement ) { return new com . google . cloud . teleport . values . FailsafeElement < > ( other . originalPayload , other . payload ) . setErrorMessage ( other . getErrorMessage ( ) ) . setStacktrace ( other . getStacktrace ( ) ) ; }
org . junit . Assert . assertEquals ( noProject . get ( 0 ) , entities . get ( 0 ) )
getStatementTest ( ) { java . sql . Statement stmt1 = sharedConnection . createStatement ( ) ; java . sql . ResultSet rs = stmt1 . executeQuery ( "select<sp>1<sp>as<sp>'hej'" ) ; "<AssertPlaceHolder>" ; } getStatement ( ) { return statement ; }
org . junit . Assert . assertEquals ( stmt1 , rs . getStatement ( ) )
testFind_Distinct ( ) { org . openscience . cdk . interfaces . IAtomContainer dummy = mock ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; int [ ] [ ] g = new int [ ] [ ] { new int [ ] { 1 , 5 , 6 } , new int [ ] { 0 , 2 } , new int [ ] { 1 , 3 } , new int [ ] { 2 , 4 , 7 } , new int [ ] { 3 , 5 } , new int [ ] { 0 , 4 } , new int [ ] { 0 } , new int [ ] { 3 } } ; long [ ] values = new long [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } ; org . openscience . cdk . hash . EquivalentSetFinder finder = new org . openscience . cdk . hash . AllEquivalentCyclicSet ( ) ; java . util . Set < java . lang . Integer > set = finder . find ( values , dummy , g ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
org . junit . Assert . assertThat ( set . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
testIsAllowedString_null ( ) { java . lang . String testStr = null ; org . terasoluna . gfw . common . codepoints . Set < java . lang . Integer > allowedCodePointSet = new org . terasoluna . gfw . common . codepoints . HashSet < java . lang . Integer > ( ) ; boolean result = new org . terasoluna . gfw . common . codepoints . CodePoints ( allowedCodePointSet ) . containsAll ( testStr ) ; "<AssertPlaceHolder>" ; } containsAll ( java . lang . String ) { return ( this . firstExcludedCodePoint ( s ) ) == ( org . terasoluna . gfw . common . codepoints . CodePoints . NOT_FOUND ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
validate_shouldPassIfNoneofTheConceptDescriptionsIsNull ( ) { concept . addName ( new org . openmrs . ConceptName ( "some<sp>name" , org . openmrs . api . context . Context . getLocale ( ) ) ) ; concept . addDescription ( new org . openmrs . ConceptDescription ( "some<sp>description" , null ) ) ; concept . setConceptClass ( new org . openmrs . ConceptClass ( ) ) ; concept . setDatatype ( new org . openmrs . ConceptDatatype ( ) ) ; validator . validate ( concept , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertFalse ( errors . hasErrors ( ) )
canFormatNestedMapsAndLists ( ) { java . lang . String entity = json . assemble ( new org . neo4j . server . rest . repr . MappingRepresentation ( "test" ) { @ org . neo4j . server . rest . repr . formats . Override protected void serialize ( org . neo4j . server . rest . repr . MappingSerializer serializer ) { java . util . ArrayList < org . neo4j . server . rest . repr . Representation > maps = new java . util . ArrayList ( ) ; maps . add ( new org . neo4j . server . rest . repr . MappingRepresentation ( "map" ) { @ org . neo4j . server . rest . repr . formats . Override protected void serialize ( org . neo4j . server . rest . repr . MappingSerializer serializer ) { serializer . putString ( "foo" , "bar" ) ; } } ) ; serializer . putList ( "foo" , new org . neo4j . server . rest . repr . ServerListRepresentation ( org . neo4j . server . rest . repr . RepresentationType . MAP , maps ) ) ; } } ) ; "<AssertPlaceHolder>" ; } jsonToMap ( java . lang . String ) { return ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( org . neo4j . server . rest . domain . JsonHelper . readJson ( json ) ) ) ; }
org . junit . Assert . assertEquals ( "bar" , ( ( java . util . Map ) ( ( ( java . util . List ) ( org . neo4j . server . rest . domain . JsonHelper . jsonToMap ( entity ) . get ( "foo" ) ) ) . get ( 0 ) ) ) . get ( "foo" ) )
waitWorks ( ) { long start = java . lang . System . currentTimeMillis ( ) ; final java . lang . Object lock = new java . lang . Object ( ) ; synchronized ( lock ) { lock . wait ( 110 ) ; } long end = java . lang . System . currentTimeMillis ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( ( end - start ) > 100 ) )
testMaxLength ( ) { org . nuxeo . ecm . core . schema . types . Field field = schema . getField ( "stringConstraints" ) ; "<AssertPlaceHolder>" ; } getMaxLength ( ) { return maxLength ; }
org . junit . Assert . assertEquals ( 4 , field . getMaxLength ( ) )
testColumnNames ( ) { net . casper . io . CBuildFromTableReader bxls = new net . casper . io . CBuildFromTableReader ( xlsUnspecified , "id" ) ; "<AssertPlaceHolder>" ; } getColumnNames ( ) { return this . columnNames ; }
org . junit . Assert . assertArrayEquals ( header , bxls . getColumnNames ( ) )
testEntitiesNoParents ( ) { com . cloudera . csd . descriptors . MetricEntityTypeDescriptor entity2 = mockEntity ( "foobar_entity_two" ) ; addEntity ( entity ) ; addEntity ( entity2 ) ; "<AssertPlaceHolder>" ; } validate ( com . cloudera . csd . validation . monitoring . MonitoringValidationContext , com . cloudera . csd . descriptors . MetricEntityAttributeDescriptor , com . cloudera . csd . validation . references . components . DescriptorPathImpl ) { com . google . common . base . Preconditions . checkNotNull ( context ) ; com . google . common . base . Preconditions . checkNotNull ( attribute ) ; com . google . common . base . Preconditions . checkNotNull ( path ) ; path = constructPathFromProperty ( attribute , "name" , path ) ; java . lang . String attributeName = attribute . getName ( ) ; java . lang . String serviceName = context . serviceDescriptor . getName ( ) . toLowerCase ( ) ; if ( ( ! ( attributeName . startsWith ( serviceName ) ) ) && ( ! ( builtInAttributes . contains ( attributeName ) ) ) ) { java . lang . String msg = java . lang . String . format ( "Attribute<sp>'%s'<sp>does<sp>not<sp>start<sp>with<sp>the<sp>service<sp>name<sp>('%s')" , attributeName , serviceName ) ; return forViolation ( msg , attribute , attributeName , path ) ; } return noViolations ( ) ; }
org . junit . Assert . assertTrue ( validator . validate ( context , entity , root ) . isEmpty ( ) )
findTenantAdminByIdTest ( ) { org . kaaproject . kaa . common . dto . UserDto tenantAdminDto = generateTenantAdmin ( null , null ) ; org . kaaproject . kaa . common . dto . UserDto found = userService . findUserById ( tenantAdminDto . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( tenantAdminDto , found )
testComplexQualifier ( ) { org . apache . accumulo . core . client . summary . SummarizerConfiguration sc = org . apache . accumulo . core . client . summary . SummarizerConfiguration . builder ( org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer . class ) . build ( ) ; org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer entrySum = new org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer ( ) ; org . apache . accumulo . core . data . Key k1 = new org . apache . accumulo . core . data . Key ( "r1" , "key.logHist.4" 5 , "row.sum" 1 ) ; org . apache . accumulo . core . data . Key k2 = new org . apache . accumulo . core . data . Key ( "columnRow3" 9 , "row.sum" 3 , "family.logHist.4" 0 ) ; org . apache . accumulo . core . data . Key k3 = new org . apache . accumulo . core . data . Key ( "columnRow3" , "row.sum" 4 , "row.sum" 7 ) ; org . apache . accumulo . core . client . summary . Summarizer . Collector collector = entrySum . collector ( sc ) ; collector . accept ( k1 , new org . apache . accumulo . core . data . Value ( "columnRow3" 6 ) ) ; collector . accept ( k2 , new org . apache . accumulo . core . data . Value ( "columnRow3" 6 ) ) ; collector . accept ( k3 , new org . apache . accumulo . core . data . Value ( "columnRow3" 6 ) ) ; java . util . HashMap < java . lang . String , java . lang . Long > stats = new java . util . HashMap ( ) ; collector . summarize ( stats :: put ) ; java . util . HashMap < java . lang . String , java . lang . Long > expected = new java . util . HashMap ( ) ; expected . put ( "key.min" , 19L ) ; expected . put ( "columnRow3" 8 , 25L ) ; expected . put ( "key.logHist.4" 3 , 66L ) ; expected . put ( "key.logHist.4" , 2L ) ; expected . put ( "columnRow3" 4 , 1L ) ; expected . put ( "row.sum" 0 , 2L ) ; expected . put ( "key.logHist.4" 2 , 10L ) ; expected . put ( "row.sum" , 16L ) ; expected . put ( "key.logHist.4" 9 , 1L ) ; expected . put ( "row.sum" 8 , 1L ) ; expected . put ( "row.sum" 2 , 1L ) ; expected . put ( "columnRow3" 7 , 2L ) ; expected . put ( "key.logHist.4" 4 , 13L ) ; expected . put ( "family.sum" , 22L ) ; expected . put ( "key.logHist.4" 0 , 1L ) ; expected . put ( "key.logHist.4" 6 , 1L ) ; expected . put ( "family.logHist.4" , 1L ) ; expected . put ( "columnRow3" 0 , 2L ) ; expected . put ( "row.sum" 9 , 16L ) ; expected . put ( "key.logHist.4" 8 , 28L ) ; expected . put ( "qualifier.logHist.1" , 1L ) ; expected . put ( "qualifier.logHist.3" , 1L ) ; expected . put ( "key.logHist.4" 1 , 1L ) ; expected . put ( "family.logHist.4" 1 , 0L ) ; expected . put ( "row.sum" 5 , 0L ) ; expected . put ( "row.sum" 6 , 0L ) ; expected . put ( "columnRow3" 2 , 3L ) ; expected . put ( "value.min" , 0L ) ; expected . put ( "key.logHist.4" 7 , 0L ) ; expected . put ( "columnRow3" 5 , 0L ) ; expected . put ( "columnRow3" 1 , 3L ) ; expected . put ( "columnRow3" 3 , 3L ) ; "<AssertPlaceHolder>" ; } put ( java . lang . Long , org . apache . accumulo . server . tabletserver . LargestFirstMemoryManager$TabletInfo ) { if ( ( map . size ( ) ) == ( max ) ) { if ( ( key . compareTo ( map . firstKey ( ) ) ) < 0 ) return false ; try { add ( key , value ) ; return true ; } finally { map . remove ( map . firstKey ( ) ) ; } } else { add ( key , value ) ; return true ; } }
org . junit . Assert . assertEquals ( expected , stats )
testNewElement_IElement ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IElement element = builder . newInstance ( org . openscience . cdk . interfaces . IElement . class , builder . newInstance ( org . openscience . cdk . interfaces . IElement . class ) ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class , java . lang . Object [ ] ) { return factory . ofClass ( clazz , params ) ; }
org . junit . Assert . assertNotNull ( element )
testSufficientPluginFollowedByFailedConfig ( ) { org . dcache . gplazma . strategies . MappingStrategy strategy = strategyFactory . newMappingStrategy ( ) ; "<AssertPlaceHolder>" ; strategy . setPlugins ( sufficientPluginFollowedByFailedArray ) ; java . util . Set < java . security . Principal > principals = com . google . common . collect . Sets . newHashSet ( ) ; strategy . map ( org . dcache . gplazma . strategies . MappingStrategyMapTests . IGNORING_LOGIN_MONITOR , principals ) ; } newMappingStrategy ( ) { return new org . dcache . gplazma . strategies . DefaultMappingStrategy ( ) ; }
org . junit . Assert . assertNotNull ( strategy )
convertToFloatNull ( ) { "<AssertPlaceHolder>" ; } toFloat ( java . lang . Long ) { if ( value == null ) { return null ; } return value . floatValue ( ) ; }
org . junit . Assert . assertNull ( converter . toFloat ( null ) )
testUseConstructorInConstraint ( ) { java . lang . String str = "rule<sp>R<sp>when\n" + ( ( ( "<sp>$s:<sp>Short()" + "<sp>$d:<sp>Double(<sp>this<sp>><sp>new<sp>Double($s)<sp>)\n" ) + "then\n" ) + "end\n" ) ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( ( ( short ) ( 1 ) ) ) ; ksession . insert ( 2.0 ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) )
testMixingGlobalDataAndDataSource ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "import<sp>" + ( org . drools . testcoverage . common . model . Person . class . getCanonicalName ( ) ) ) + "then\n" 8 ) + "import<sp>" ) + ( org . drools . compiler . integrationtests . RuleUnitTest . FlowUnit . class . getCanonicalName ( ) ) ) + "then\n" 8 ) + "import<sp>" ) + ( org . drools . compiler . integrationtests . RuleUnitTest . AdultUnit . class . getCanonicalName ( ) ) ) + "then\n" 8 ) + "import<sp>" ) + ( org . drools . compiler . integrationtests . RuleUnitTest . NotAdultUnit . class . getCanonicalName ( ) ) ) + "then\n" 8 ) + "then\n" 1 ) + "then\n" ) + "then\n" 7 ) + "then\n" 3 ) + "then\n" 0 ) + "end\n" ) + "then\n" 2 ) + "<sp>$i<sp>:<sp>Integer(this<sp>>=<sp>$age)\n" 1 ) + "<sp>Person(age<sp>>=<sp>$i,<sp>$name<sp>:<sp>name)<sp>from<sp>persons\n" ) + "then\n" ) + "<sp>System.out.println($name<sp>+<sp>\"<sp>is<sp>adult\");\n" ) + "end\n" ) + "rule<sp>NotAdult<sp>@Unit(<sp>NotAdultUnit.class<sp>)<sp>when\n" ) + "then\n" 4 ) + "<sp>$i<sp>:<sp>Integer(this<sp>>=<sp>$age)\n" ) + "then\n" ) + "<sp>System.out.println($name<sp>+<sp>\"<sp>is<sp>NOT<sp>adult\");\n" ) + "<sp>$i<sp>:<sp>Integer(this<sp>>=<sp>$age)\n" 0 ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "rule-unit-test" , kieBaseTestConfiguration , drl ) ; final org . kie . api . runtime . rule . RuleUnitExecutor executor = org . kie . api . runtime . rule . RuleUnitExecutor . create ( ) . bind ( kbase ) ; try { executor . newDataSource ( "then\n" 5 , new org . drools . testcoverage . common . model . Person ( "Mario" , 42 ) , new org . drools . testcoverage . common . model . Person ( "then\n" 6 , 44 ) , new org . drools . testcoverage . common . model . Person ( "then\n" 9 , 4 ) ) ; "<AssertPlaceHolder>" ; } finally { executor . dispose ( ) ; } } run ( org . junit . runner . notification . RunNotifier ) { for ( org . drools . workbench . models . testscenarios . shared . Scenario scenario : scenarios ) { runScenario ( notifier , scenario ) ; } }
org . junit . Assert . assertEquals ( 4 , executor . run ( org . drools . compiler . integrationtests . RuleUnitTest . FlowUnit . class ) )
testClassLiteralsWithOr ( ) { java . lang . String drl = "declare<sp>Foo<sp>" 9 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "import<sp>org.drools.core.factmodel.traits.*;<sp>" + "declare<sp>trait<sp>A<sp>end<sp>" 0 ) + "declare<sp>Foo<sp>" ) + "@Traitable<sp>" ) + "declare<sp>Foo<sp>" 3 ) + "declare<sp>trait<sp>A<sp>end<sp>" ) + "declare<sp>Foo<sp>" 0 ) + "rule<sp>Init<sp>" ) + "declare<sp>trait<sp>A<sp>end<sp>" 2 ) + "declare<sp>Foo<sp>" 4 ) + "<sp>Foo<sp>f<sp>=<sp>new<sp>Foo();<sp>" ) + "declare<sp>trait<sp>A<sp>end<sp>" 3 ) + "declare<sp>Foo<sp>" 3 ) + "declare<sp>Foo<sp>" 6 ) + "declare<sp>trait<sp>A<sp>end<sp>" 2 ) + "<sp>$f<sp>:<sp>Foo(<sp>this<sp>not<sp>isA<sp>A<sp>)<sp>" ) + "declare<sp>Foo<sp>" 4 ) + "declare<sp>Foo<sp>" 5 ) + "declare<sp>Foo<sp>" 3 ) + "rule<sp>Two<sp>" ) + "declare<sp>trait<sp>A<sp>end<sp>" 2 ) + "declare<sp>trait<sp>A<sp>end<sp>" 1 ) + "declare<sp>Foo<sp>" 4 ) + "declare<sp>Foo<sp>" 2 ) + "declare<sp>Foo<sp>" 3 ) + "rule<sp>Check<sp>" ) + "declare<sp>trait<sp>A<sp>end<sp>" 2 ) + "declare<sp>Foo<sp>" 8 ) + "declare<sp>Foo<sp>" 4 ) + "<sp>list.add(<sp>1<sp>);<sp>" ) + "declare<sp>Foo<sp>" 3 ) + "declare<sp>Foo<sp>" 1 ) ; org . kie . api . KieBase kbase = new org . kie . internal . utils . KieHelper ( org . kie . internal . builder . conf . PropertySpecificOption . ALLOWED ) . addContent ( drl , ResourceType . DRL ) . build ( ) ; org . drools . core . factmodel . traits . TraitFactory . setMode ( mode , kbase ) ; java . util . ArrayList list = new java . util . ArrayList ( ) ; org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; ksession . setGlobal ( "declare<sp>Foo<sp>" 7 , list ) ; ksession . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } asList ( int [ ] ) { java . util . List < java . lang . Integer > list = new java . util . ArrayList < java . lang . Integer > ( ints . length ) ; for ( int i : ints ) { list . add ( i ) ; } return list ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 ) , list )
testShouldReturnItIfExistsInRootFolder ( ) { com . liferay . portal . kernel . repository . model . FileEntry fileEntry1 = com . liferay . document . library . kernel . service . DLAppLocalServiceUtil . addFileEntry ( com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) , group . getGroupId ( ) , DLFolderConstants . DEFAULT_PARENT_FOLDER_ID , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , ContentTypes . APPLICATION_OCTET_STREAM , new byte [ 0 ] , com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ) ; com . liferay . portal . kernel . repository . model . FileEntry fileEntry2 = com . liferay . document . library . kernel . service . DLAppLocalServiceUtil . getFileEntry ( group . getGroupId ( ) , DLFolderConstants . DEFAULT_PARENT_FOLDER_ID , fileEntry1 . getTitle ( ) ) ; "<AssertPlaceHolder>" ; } getFileEntryId ( ) { return com . liferay . upload . web . internal . HTMLImageAttachmentElementReplacerTest . _IMAGE_FILE_ENTRY_ID ; }
org . junit . Assert . assertEquals ( fileEntry1 . getFileEntryId ( ) , fileEntry2 . getFileEntryId ( ) )
getAllUnaccessibleUsersWhateverTheDomainWhenInSilverpeasDomainAndWithFullDomainIsolation ( ) { try { com . stratelia . webactiv . util . GeneralPropertiesManagerHelper . setDomainVisibility ( DomainProperties . DVIS_ALL ) ; com . stratelia . webactiv . beans . admin . UserDetail [ ] expectedUsers = getTestResources ( ) . getAllExistingUsers ( ) ; getTestResources ( ) . whenSearchUsersByCriteriaThenReturn ( new com . stratelia . webactiv . beans . admin . UserDetailsSearchCriteria ( ) , expectedUsers ) ; } catch ( com . sun . jersey . api . client . UniformInterfaceException ex ) { int receivedStatus = ex . getResponse ( ) . getStatus ( ) ; int forbidden = Response . Status . FORBIDDEN . getStatusCode ( ) ; "<AssertPlaceHolder>" ; } } is ( T ) { return java . util . Objects . equals ( this . value , value ) ; }
org . junit . Assert . assertThat ( receivedStatus , org . hamcrest . Matchers . is ( forbidden ) )
testShouldReturnDriverWhereTheMostCapabilitiesMatch_lotsOfRegisteredDrivers ( ) { abstract class Chrome implements org . openqa . selenium . WebDriver { } abstract class Firefox implements org . openqa . selenium . WebDriver { } abstract class HtmlUnit implements org . openqa . selenium . WebDriver { } abstract class Ie implements org . openqa . selenium . WebDriver { } abstract class Opera implements org . openqa . selenium . WebDriver { } factory . registerDriver ( org . openqa . selenium . remote . DesiredCapabilities . chrome ( ) , Chrome . class ) ; factory . registerDriver ( org . openqa . selenium . remote . DesiredCapabilities . firefox ( ) , Firefox . class ) ; factory . registerDriver ( org . openqa . selenium . remote . DesiredCapabilities . htmlUnit ( ) , HtmlUnit . class ) ; factory . registerDriver ( org . openqa . selenium . remote . DesiredCapabilities . internetExplorer ( ) , Ie . class ) ; factory . registerDriver ( org . openqa . selenium . remote . DesiredCapabilities . opera ( ) , Opera . class ) ; org . openqa . selenium . remote . DesiredCapabilities desiredCapabilities = new org . openqa . selenium . remote . DesiredCapabilities ( ) ; desiredCapabilities . setBrowserName ( BrowserType . IE ) ; desiredCapabilities . setVersion ( "" ) ; desiredCapabilities . setJavascriptEnabled ( true ) ; desiredCapabilities . setPlatform ( Platform . ANY ) ; "<AssertPlaceHolder>" ; } getBestMatchFor ( org . openqa . selenium . Capabilities ) { return getProviderMatching ( desired ) . getDriverClass ( ) ; }
org . junit . Assert . assertEquals ( Ie . class , factory . getBestMatchFor ( desiredCapabilities ) )
testUnderReplicatedQuasiClosedContainer ( ) { final org . apache . hadoop . hdds . scm . container . ContainerInfo container = org . apache . hadoop . hdds . scm . TestUtils . getContainer ( LifeCycleState . QUASI_CLOSED ) ; final org . apache . hadoop . hdds . scm . container . ContainerID id = container . containerID ( ) ; final java . util . UUID originNodeId = java . util . UUID . randomUUID ( ) ; final org . apache . hadoop . hdds . scm . container . ContainerReplica replicaOne = org . apache . hadoop . hdds . scm . TestUtils . getReplicas ( id , State . QUASI_CLOSED , 1000L , originNodeId , org . apache . hadoop . hdds . scm . TestUtils . randomDatanodeDetails ( ) ) ; final org . apache . hadoop . hdds . scm . container . ContainerReplica replicaTwo = org . apache . hadoop . hdds . scm . TestUtils . getReplicas ( id , State . QUASI_CLOSED , 1000L , originNodeId , org . apache . hadoop . hdds . scm . TestUtils . randomDatanodeDetails ( ) ) ; containerStateManager . loadContainer ( container ) ; containerStateManager . updateContainerReplica ( id , replicaOne ) ; containerStateManager . updateContainerReplica ( id , replicaTwo ) ; final int currentReplicateCommandCount = datanodeCommandHandler . getInvocationCount ( SCMCommandProto . Type . replicateContainerCommand ) ; replicationManager . processContainersNow ( ) ; java . lang . Thread . sleep ( 100L ) ; "<AssertPlaceHolder>" ; } getInvocationCount ( org . apache . hadoop . hdds . protocol . proto . StorageContainerDatanodeProtocolProtos . SCMCommandProto$Type ) { return commandInvocation . containsKey ( type ) ? commandInvocation . get ( type ) . get ( ) : 0 ; }
org . junit . Assert . assertEquals ( ( currentReplicateCommandCount + 1 ) , datanodeCommandHandler . getInvocationCount ( SCMCommandProto . Type . replicateContainerCommand ) )
testGetAliasTypeName ( ) { org . sagebionetworks . repo . model . dbo . MigratableDatabaseObject mdo = new org . sagebionetworks . repo . model . dbo . persistence . DBONode ( ) ; org . sagebionetworks . repo . model . daemon . BackupAliasType type = org . sagebionetworks . repo . model . daemon . BackupAliasType . MIGRATION_TYPE_NAME ; java . lang . String allias = org . sagebionetworks . repo . manager . migration . BackupFileStreamImpl . getAlias ( mdo , type ) ; "<AssertPlaceHolder>" ; } getMigratableTableType ( ) { return org . sagebionetworks . repo . model . migration . MigrationType . BROADCAST_MESSAGE ; }
org . junit . Assert . assertEquals ( mdo . getMigratableTableType ( ) . name ( ) , allias )
getTextStart ( ) { int expected = 10 ; when ( this . reader . getTextStart ( ) ) . thenReturn ( expected ) ; int result = this . filter . getTextStart ( ) ; "<AssertPlaceHolder>" ; } getTextStart ( ) { int expected = 10 ; when ( this . reader . getTextStart ( ) ) . thenReturn ( expected ) ; int result = this . filter . getTextStart ( ) ; org . junit . Assert . assertSame ( expected , result ) ; }
org . junit . Assert . assertSame ( expected , result )
testThatLanguageIsKorean ( ) { util . validator . LanguageChecker languageChecker = new util . validator . LanguageChecker ( ) ; java . lang . String expectedLanguage = "ko" ; java . lang . String actualLanguage = languageChecker . getRecognisedLanguage ( "<sp><sp><sp><sp><sp>,<sp>,<sp>,<sp>,<sp><sp><sp><sp><sp>." ) . get ( ) . getLanguage ( ) ; "<AssertPlaceHolder>" ; } getRecognisedLanguage ( org . openqa . selenium . WebDriver ) { return net . itarray . automotion . tools . helpers . LanguageChecker . getRecognisedLanguage ( driver ) ; }
org . junit . Assert . assertEquals ( expectedLanguage , actualLanguage )
testGetFullName_1 ( ) { org . jinstagram . entity . users . basicinfo . UserInfoData fixture = new org . jinstagram . entity . users . basicinfo . UserInfoData ( ) ; fixture . setUsername ( "" ) ; fixture . setFullName ( "" ) ; fixture . setProfilePicture ( "" ) ; fixture . setId ( "" ) ; fixture . setLast_name ( "" ) ; fixture . setCounts ( new org . jinstagram . entity . users . basicinfo . Counts ( ) ) ; fixture . setFirstName ( "" ) ; fixture . setBio ( "" ) ; fixture . setWebsite ( "" ) ; java . lang . String result = fixture . getFullName ( ) ; "<AssertPlaceHolder>" ; } getFullName ( ) { return fullName ; }
org . junit . Assert . assertEquals ( "" , result )
testMetric ( ) { ipExtendedReachabilityTlv . setMetric ( 10 ) ; result2 = ipExtendedReachabilityTlv . metric ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( result2 , org . hamcrest . CoreMatchers . is ( 10 ) )
shouldNotMatchIfAdditionalFilesPresent ( ) { net . ripe . rpki . commons . crypto . cms . manifest . ManifestCms mft = net . ripe . rpki . commons . crypto . cms . manifest . ManifestCmsTest . getRootManifestCms ( ) ; java . util . Map < java . lang . String , byte [ ] > wrongFiles = new java . util . HashMap < java . lang . String , byte [ ] > ( net . ripe . rpki . commons . crypto . cms . manifest . ManifestCmsTest . files ) ; wrongFiles . put ( "newfile" , net . ripe . rpki . commons . crypto . cms . manifest . ManifestCmsTest . FILE1_CONTENTS ) ; "<AssertPlaceHolder>" ; } matchesFiles ( java . util . Map ) { if ( hashes . keySet ( ) . equals ( filesToMatch . keySet ( ) ) ) { for ( java . util . Map . Entry < java . lang . String , byte [ ] > entry : hashes . entrySet ( ) ) { java . lang . String fileName = entry . getKey ( ) ; byte [ ] contentToMatch = filesToMatch . get ( fileName ) ; if ( ! ( verifyFileContents ( fileName , contentToMatch ) ) ) { return false ; } } return true ; } else { return false ; } }
org . junit . Assert . assertFalse ( mft . matchesFiles ( wrongFiles ) )
testNoSlowConsumerAdvisory ( ) { javax . jms . Session s = connection . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; javax . jms . Queue queue = s . createQueue ( getClass ( ) . getName ( ) ) ; javax . jms . MessageConsumer consumer = s . createConsumer ( queue ) ; consumer . setMessageListener ( new javax . jms . MessageListener ( ) { @ org . apache . activemq . advisory . Override public void onMessage ( javax . jms . Message message ) { } } ) ; javax . jms . Topic advisoryTopic = org . apache . activemq . advisory . AdvisorySupport . getSlowConsumerAdvisoryTopic ( ( ( org . apache . activemq . command . ActiveMQDestination ) ( queue ) ) ) ; s = connection . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; javax . jms . MessageConsumer advisoryConsumer = s . createConsumer ( advisoryTopic ) ; javax . jms . MessageProducer producer = s . createProducer ( queue ) ; for ( int i = 0 ; i < ( org . apache . activemq . advisory . AdvisoryTests . MESSAGE_COUNT ) ; i ++ ) { javax . jms . BytesMessage m = s . createBytesMessage ( ) ; m . writeBytes ( new byte [ 1024 ] ) ; producer . send ( m ) ; } javax . jms . Message msg = advisoryConsumer . receive ( 1000 ) ; "<AssertPlaceHolder>" ; } receive ( int ) { return receive ( numToReceive , 2 ) ; }
org . junit . Assert . assertNull ( msg )
getByDeptAndDesig ( ) { when ( deptDesigRepository . findByDepartment_IdAndDesignation_Id ( department . getId ( ) , designation . getId ( ) ) ) . thenReturn ( deptDesig ) ; final java . lang . Integer sancPosts = deptDesigService . findByDepartmentAndDesignation ( department . getId ( ) , designation . getId ( ) ) . getSanctionedPosts ( ) ; "<AssertPlaceHolder>" ; } getSanctionedPosts ( ) { return sanctionedPosts ; }
org . junit . Assert . assertEquals ( sancPosts , java . lang . Integer . valueOf ( 5 ) )
tableIsUnderCircusTrainControlTableDoesNotExist ( ) { when ( client . tableExists ( com . hotels . bdp . circustrain . core . replica . DestructiveReplicaTest . DATABASE , com . hotels . bdp . circustrain . core . replica . DestructiveReplicaTest . REPLICA_TABLE ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; verify ( client ) . close ( ) ; } tableIsUnderCircusTrainControl ( ) { when ( client . tableExists ( com . hotels . bdp . circustrain . core . replica . DestructiveReplicaTest . DATABASE , com . hotels . bdp . circustrain . core . replica . DestructiveReplicaTest . REPLICA_TABLE ) ) . thenReturn ( true ) ; when ( client . getTable ( com . hotels . bdp . circustrain . core . replica . DestructiveReplicaTest . DATABASE , com . hotels . bdp . circustrain . core . replica . DestructiveReplicaTest . REPLICA_TABLE ) ) . thenReturn ( table ) ; org . junit . Assert . assertThat ( replica . tableIsUnderCircusTrainControl ( ) , org . hamcrest . CoreMatchers . is ( true ) ) ; verify ( client ) . close ( ) ; }
org . junit . Assert . assertThat ( replica . tableIsUnderCircusTrainControl ( ) , org . hamcrest . CoreMatchers . is ( true ) )
testConnection ( ) { final io . vertigo . database . sql . connection . SqlConnection connection = obtainMainConnection ( ) ; try { "<AssertPlaceHolder>" ; connection . commit ( ) ; } finally { connection . release ( ) ; } } obtainMainConnection ( ) { return dataBaseManager . getConnectionProvider ( SqlDataBaseManager . MAIN_CONNECTION_PROVIDER_NAME ) . obtainConnection ( ) ; }
org . junit . Assert . assertNotNull ( connection )
testGeenExceptiesInToStringMetNullWaarden ( ) { org . apache . cxf . message . Message message = new org . apache . cxf . message . MessageImpl ( ) ; nl . bzk . brp . web . interceptor . ArchiveringBericht bericht = new nl . bzk . brp . web . interceptor . ArchiveringBericht ( message , "Test" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( "EersteInschrijving{" + "bronnen=" ) + ( bronnen ) ) + ",<sp>ouder1=" ) + ( ouder1 ) ) + ",<sp>ouder2=" ) + ( ouder2 ) ) + ",<sp>kind=" ) + ( kind ) ) + '}' ; }
org . junit . Assert . assertNotNull ( bericht . toString ( ) )
pathUtilTest11 ( ) { java . io . File [ ] roots = java . io . File . listRoots ( ) ; java . io . File basePath = new java . io . File ( ( ( roots [ 0 ] ) + "some" ) ) ; java . io . File relativePath = new java . io . File ( ( ( ( ( ( ( roots [ 0 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir" ) + ( java . io . File . separatorChar ) ) + "dir2" ) ) ; java . lang . String path = org . jf . util . PathUtil . getRelativeFileInternal ( basePath , relativePath ) ; "<AssertPlaceHolder>" ; } getRelativeFileInternal ( java . io . File , java . io . File ) { java . util . ArrayList < java . lang . String > basePath = org . jf . util . PathUtil . getPathComponents ( canonicalBaseFile ) ; java . util . ArrayList < java . lang . String > pathToRelativize = org . jf . util . PathUtil . getPathComponents ( canonicalFileToRelativize ) ; if ( ! ( basePath . get ( 0 ) . equals ( pathToRelativize . get ( 0 ) ) ) ) { return canonicalFileToRelativize . getPath ( ) ; } int commonDirs ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( commonDirs = 1 ; ( commonDirs < ( basePath . size ( ) ) ) && ( commonDirs < ( pathToRelativize . size ( ) ) ) ; commonDirs ++ ) { if ( ! ( basePath . get ( commonDirs ) . equals ( pathToRelativize . get ( commonDirs ) ) ) ) { break ; } } boolean first = true ; for ( int i = commonDirs ; i < ( basePath . size ( ) ) ; i ++ ) { if ( ! first ) { sb . append ( File . separatorChar ) ; } else { first = false ; } sb . append ( ".." ) ; } first = true ; for ( int i = commonDirs ; i < ( pathToRelativize . size ( ) ) ; i ++ ) { if ( first ) { if ( ( sb . length ( ) ) != 0 ) { sb . append ( File . separatorChar ) ; } first = false ; } else { sb . append ( File . separatorChar ) ; } sb . append ( pathToRelativize . get ( i ) ) ; } if ( ( sb . length ( ) ) == 0 ) { return "." ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( path , ( ( "dir" + ( java . io . File . separatorChar ) ) + "dir2" ) )
testFetchByPrimaryKeyExisting ( ) { com . liferay . friendly . url . model . FriendlyURLEntryMapping newFriendlyURLEntryMapping = addFriendlyURLEntryMapping ( ) ; com . liferay . friendly . url . model . FriendlyURLEntryMapping existingFriendlyURLEntryMapping = _persistence . fetchByPrimaryKey ( newFriendlyURLEntryMapping . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingFriendlyURLEntryMapping , newFriendlyURLEntryMapping )
testFromDenseVector ( ) { double [ ] values = new double [ ] { 1 , 2 , 0 } ; net . librec . math . structure . Vector v2 = new net . librec . math . structure . VectorBasedDenseVector ( values ) ; net . librec . math . structure . VectorBasedSequentialSparseVector sv = new net . librec . math . structure . VectorBasedSequentialSparseVector ( v2 ) ; System . out . println ( ( "" + ( sv . getNumEntries ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getNumEntries ( ) { return length ; }
org . junit . Assert . assertEquals ( 2 , sv . getNumEntries ( ) )
testAddLayoutPageTemplateCollection ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; com . liferay . layout . page . template . model . LayoutPageTemplateCollection layoutPageTemplateCollection = com . liferay . layout . page . template . service . LayoutPageTemplateCollectionServiceUtil . addLayoutPageTemplateCollection ( _group . getGroupId ( ) , "Layout<sp>Page<sp>Template<sp>Collection" , null , serviceContext ) ; "<AssertPlaceHolder>" ; } getName ( ) { return _name ; }
org . junit . Assert . assertEquals ( "Layout<sp>Page<sp>Template<sp>Collection" , layoutPageTemplateCollection . getName ( ) )
testJoinUnionWithNotExistsWithCriteria ( ) { com . splicemachine . derby . impl . sql . execute . operations . joins . List < java . lang . Object [ ] > expected = com . splicemachine . derby . impl . sql . execute . operations . joins . Arrays . asList ( o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 0 , "P1" , java . math . BigDecimal . valueOf ( 40 ) ) , o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 0 , "P2" , java . math . BigDecimal . valueOf ( 20 ) ) , o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 0 , "P3" , java . math . BigDecimal . valueOf ( 80 ) ) , o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 0 , "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 3 , java . math . BigDecimal . valueOf ( 20 ) ) , o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 0 , "P5" , java . math . BigDecimal . valueOf ( 12 ) ) , o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 0 , "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 1 , java . math . BigDecimal . valueOf ( 12 ) ) , o ( "Betty" , "P1" , java . math . BigDecimal . valueOf ( 40 ) ) , o ( "Betty" , "P2" , java . math . BigDecimal . valueOf ( 80 ) ) , o ( "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 2 , "P2" , java . math . BigDecimal . valueOf ( 20 ) ) , o ( "Don" , "P2" , java . math . BigDecimal . valueOf ( 20 ) ) , o ( "Don" , "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 3 , java . math . BigDecimal . valueOf ( 40 ) ) , o ( "Don" , "P5" , java . math . BigDecimal . valueOf ( 80 ) ) , o ( "Ed" , "P1" , java . math . BigDecimal . valueOf ( 40 ) ) , o ( "Ed" , "P2" , java . math . BigDecimal . valueOf ( 20 ) ) , o ( "Ed" , "P2" , java . math . BigDecimal . valueOf ( 80 ) ) , o ( "Ed" , "P3" , java . math . BigDecimal . valueOf ( 80 ) ) , o ( "Ed" , "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 3 , java . math . BigDecimal . valueOf ( 20 ) ) , o ( "Ed" , "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 3 , java . math . BigDecimal . valueOf ( 40 ) ) , o ( "Ed" , "P5" , java . math . BigDecimal . valueOf ( 12 ) ) , o ( "Ed" , "P5" , java . math . BigDecimal . valueOf ( 80 ) ) , o ( "Ed" , "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" 1 , java . math . BigDecimal . valueOf ( 12 ) ) ) ; java . sql . ResultSet resultSet = methodWatcher . executeQuery ( ( "select<sp>empname,pnum,hours<sp>from<sp>staff,works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum<sp>union" + ( "<sp>select<sp>empname,pnum,hours<sp>from<sp>staff,works<sp>where<sp>not<sp>exists" + "<sp>(select<sp>hours<sp>from<sp>works<sp>where<sp>staff.empnum<sp>=<sp>works.empnum)<sp>order<sp>by<sp>empname,<sp>pnum" ) ) ) ; com . splicemachine . derby . impl . sql . execute . operations . joins . List < java . lang . Object [ ] > result = com . splicemachine . homeless . TestUtils . resultSetToArrays ( resultSet ) ; com . splicemachine . derby . impl . sql . execute . operations . joins . Collections . sort ( result , new com . splicemachine . derby . impl . sql . execute . operations . joins . Comparator < java . lang . Object [ ] > ( ) { @ com . splicemachine . derby . impl . sql . execute . operations . joins . Override public int compare ( java . lang . Object [ ] o1 , java . lang . Object [ ] o2 ) { int compare = ( ( java . lang . String ) ( o1 [ 0 ] ) ) . compareTo ( ( ( java . lang . String ) ( o2 [ 0 ] ) ) ) ; if ( compare != 0 ) return compare ; compare = ( ( java . lang . String ) ( o1 [ 1 ] ) ) . compareTo ( ( ( java . lang . String ) ( o2 [ 1 ] ) ) ) ; if ( compare != 0 ) return compare ; compare = ( ( java . math . BigDecimal ) ( o1 [ 2 ] ) ) . compareTo ( ( ( java . math . BigDecimal ) ( o2 [ 2 ] ) ) ) ; return compare ; } } ) ; "<AssertPlaceHolder>" ; } toArray ( ) { return java . util . Arrays . copyOf ( buffer , size ) ; }
org . junit . Assert . assertArrayEquals ( expected . toArray ( ) , result . toArray ( ) )
deveObterValidadorComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo ( ) ; final java . lang . String validador = "validador" ; protocoloInfo . setValidador ( validador ) ; "<AssertPlaceHolder>" ; } getValidador ( ) { return this . validador ; }
org . junit . Assert . assertEquals ( validador , protocoloInfo . getValidador ( ) )
testLexerLoops ( ) { org . antlr . v4 . tool . LexerGrammar lg = new org . antlr . v4 . tool . LexerGrammar ( ( "1->4<sp>EPSILON<sp>0,0,0\n" 3 + "1->4<sp>EPSILON<sp>0,0,0\n" 6 ) ) ; java . lang . String expecting = "max<sp>type<sp>1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "1->4<sp>EPSILON<sp>0,0,0\n" 5 + "1:RULE_START<sp>0\n" ) + "2:RULE_STOP<sp>0\n" ) + "1->4<sp>EPSILON<sp>0,0,0\n" 2 ) + "4->3<sp>EPSILON<sp>0,0,0\n" 0 ) + "4->3<sp>EPSILON<sp>0,0,0\n" 1 ) + "4->3<sp>EPSILON<sp>0,0,0\n" 2 ) + "1->4<sp>EPSILON<sp>0,0,0\n" 7 ) + "rule<sp>0:1<sp>1\n" ) + "mode<sp>0:0\n" ) + "1->4<sp>EPSILON<sp>0,0,0\n" 9 ) + "1->4<sp>EPSILON<sp>0,0,0\n" ) + "1->4<sp>EPSILON<sp>0,0,0\n" 8 ) + "4->3<sp>EPSILON<sp>0,0,0\n" ) + "5->6<sp>EPSILON<sp>0,0,0\n" ) + "6->4<sp>EPSILON<sp>0,0,0\n" ) + "6->7<sp>EPSILON<sp>0,0,0\n" ) + "1->4<sp>EPSILON<sp>0,0,0\n" 1 ) + "1->4<sp>EPSILON<sp>0,0,0\n" 0 ) + "1->4<sp>EPSILON<sp>0,0,0\n" 4 ) ; org . antlr . v4 . runtime . atn . ATN atn = createATN ( lg , true ) ; java . lang . String result = org . antlr . v4 . runtime . atn . ATNSerializer . getDecoded ( atn , java . util . Arrays . asList ( lg . getTokenNames ( ) ) ) ; "<AssertPlaceHolder>" ; } getTokenNames ( ) { int numTokens = getMaxTokenType ( ) ; java . lang . String [ ] tokenNames = new java . lang . String [ numTokens + 1 ] ; for ( int i = 0 ; i < ( tokenNames . length ) ; i ++ ) { tokenNames [ i ] = getTokenName ( i ) ; } return tokenNames ; }
org . junit . Assert . assertEquals ( expecting , result )
getAISVersionIndicator ( ) { "<AssertPlaceHolder>" ; } getAISVersionIndicator ( ) { return fAISVersion ; }
org . junit . Assert . assertEquals ( 0 , msg . getAISVersionIndicator ( ) )
testFsWithNoToken ( ) { org . apache . hadoop . fs . FileSystemTestHelper . MockFileSystem fs = org . apache . hadoop . fs . TestFileSystemTokens . createFileSystemForServiceName ( null ) ; org . apache . hadoop . security . Credentials credentials = new org . apache . hadoop . security . Credentials ( ) ; fs . addDelegationTokens ( org . apache . hadoop . fs . TestFileSystemTokens . renewer , credentials ) ; verifyTokenFetch ( fs , false ) ; "<AssertPlaceHolder>" ; } numberOfTokens ( ) { return tokenMap . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , credentials . numberOfTokens ( ) )
testSortD ( ) { jsat . utils . IndexTable idt = new jsat . utils . IndexTable ( jsat . utils . IndexTableTest . array ) ; for ( int i = 0 ; i < ( ( idt . length ( ) ) - 1 ) ; i ++ ) "<AssertPlaceHolder>" ; } index ( int ) { if ( ( i >= ( prevSize ) ) || ( i < 0 ) ) throw new java . lang . IndexOutOfBoundsException ( ( ( ( ( "The<sp>size<sp>of<sp>the<sp>previously<sp>sorted<sp>array/list<sp>is<sp>" + ( prevSize ) ) + "<sp>so<sp>index<sp>" ) + i ) + "<sp>is<sp>not<sp>valid" ) ) ; return index . get ( i ) ; }
org . junit . Assert . assertTrue ( ( ( jsat . utils . IndexTableTest . array [ idt . index ( i ) ] ) <= ( jsat . utils . IndexTableTest . array [ idt . index ( ( i + 1 ) ) ] ) ) )
propertyFoundInParentWithNullPropertiesInProject ( ) { final java . lang . String propertyName = com . redhat . rcm . maven . plugin . buildmetadata . maven . MavenPropertyHelperPropertiesTest . PROPERTY_NAME ; final java . lang . String propertyValue = com . redhat . rcm . maven . plugin . buildmetadata . maven . MavenPropertyHelperPropertiesTest . PROPERTY_VALUE ; setupParentProjectWithProperty ( propertyName , propertyValue ) ; final java . lang . String value = uut . getProperty ( propertyName ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { if ( name == null ) { throw new java . lang . NullPointerException ( "Name<sp>of<sp>requested<sp>property<sp>must<sp>not<sp>be<sp>'null'" ) ; } java . lang . String value = null ; if ( isProjectProperty ( name ) ) { value = getProjectProperty ( name ) ; } if ( value == null ) { value = getPropertiesProperty ( name ) ; } return value ; }
org . junit . Assert . assertEquals ( propertyValue , value )
testIsRedirectRequired_1 ( ) { final org . apache . shindig . gadgets . oauth2 . handler . ClientCredentialsGrantTypeHandler fixture = org . apache . shindig . gadgets . oauth2 . handler . ClientCredentialsGrantTypeHandlerTest . ccgth ; final boolean result = fixture . isRedirectRequired ( ) ; "<AssertPlaceHolder>" ; } isRedirectRequired ( ) { return false ; }
org . junit . Assert . assertEquals ( false , result )
tGenericFieldType ( ) { atunit . guice . GuiceContainer container = new atunit . guice . GuiceContainer ( ) ; java . util . Map < java . lang . reflect . Field , java . lang . Object > fieldValues = com . google . common . collect . Maps . newHashMap ( ) ; java . util . List < java . lang . String > stringList = com . google . common . collect . Lists . newLinkedList ( ) ; fieldValues . put ( atunit . guice . GuiceContainerTests . GenericFieldType . class . getDeclaredField ( "stringList" ) , stringList ) ; atunit . guice . GuiceContainerTests . GenericFieldType gft = ( ( atunit . guice . GuiceContainerTests . GenericFieldType ) ( container . createTest ( atunit . guice . GuiceContainerTests . GenericFieldType . class , fieldValues ) ) ) ; "<AssertPlaceHolder>" ; } createTest ( java . lang . Class , java . util . Map ) { atunit . guice . GuiceContainer . FieldModule fields = new atunit . guice . GuiceContainer . FieldModule ( fieldValues ) ; com . google . inject . Injector injector ; if ( com . google . inject . Module . class . isAssignableFrom ( testClass ) ) { injector = com . google . inject . Guice . createInjector ( fields , ( ( com . google . inject . Module ) ( testClass . newInstance ( ) ) ) ) ; } else { injector = com . google . inject . Guice . createInjector ( fields ) ; } return injector . getInstance ( testClass ) ; }
org . junit . Assert . assertSame ( stringList , gft . stringList )
hasDiagnosis_shouldReturnTrueIfEncounterHasDiagnosis ( ) { org . openmrs . Encounter encounter = new org . openmrs . Encounter ( ) ; org . openmrs . Diagnosis diagnosis = new org . openmrs . Diagnosis ( ) ; diagnosis . setEncounter ( encounter ) ; diagnosis . setCondition ( new org . openmrs . Condition ( ) ) ; diagnosis . setCertainty ( ConditionVerificationStatus . CONFIRMED ) ; diagnosis . setPatient ( new org . openmrs . Patient ( ) ) ; diagnosis . setRank ( 2 ) ; java . util . Set < org . openmrs . Diagnosis > diagnoses = new java . util . HashSet ( ) ; diagnoses . add ( diagnosis ) ; encounter . setDiagnoses ( diagnoses ) ; "<AssertPlaceHolder>" ; } hasDiagnosis ( org . openmrs . Diagnosis ) { for ( org . openmrs . Diagnosis diagnosis1 : getDiagnoses ( ) ) { if ( diagnosis . equals ( diagnosis1 ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( encounter . hasDiagnosis ( diagnosis ) )
whenUserIdIsProvided_thenRetrievedNameIsCorrect ( ) { org . mockito . Mockito . when ( nameService . getUserName ( "SomeId" ) ) . thenReturn ( "Mock<sp>user<sp>name" ) ; java . lang . String testName = userService . getUserName ( "SomeId" ) ; "<AssertPlaceHolder>" ; } getUserName ( java . security . Principal ) { if ( principal == null ) { return "anonymous" ; } else { final org . springframework . security . core . userdetails . UserDetails currentUser = ( ( org . springframework . security . core . userdetails . UserDetails ) ( ( ( org . springframework . security . core . Authentication ) ( principal ) ) . getPrincipal ( ) ) ) ; java . util . Collection < ? extends org . springframework . security . core . GrantedAuthority > authorities = currentUser . getAuthorities ( ) ; for ( org . springframework . security . core . GrantedAuthority grantedAuthority : authorities ) { System . out . println ( grantedAuthority . getAuthority ( ) ) ; } return principal . getName ( ) ; } }
org . junit . Assert . assertEquals ( "Mock<sp>user<sp>name" , testName )
getRootGetDotDot ( ) { javax . jcr . Node root = getNode ( "/" ) ; "<AssertPlaceHolder>" ; root . getNode ( ".." ) ; } getNode ( java . lang . String ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder node = builder ; for ( java . lang . String name : org . apache . jackrabbit . oak . commons . PathUtils . elements ( path ) ) { node = node . getChildNode ( name ) ; } if ( ! ( node . exists ( ) ) ) { throw new java . lang . IllegalStateException ( ( "node<sp>does<sp>not<sp>exist:<sp>" + path ) ) ; } return node ; }
org . junit . Assert . assertNotNull ( root )
slotsAtTheMaximumPermittedAgeAreNotInvalid ( ) { stormpot . Expiration < stormpot . Poolable > expiration = createExpiration ( 2 ) ; stormpot . SlotInfo < ? > info = stormpot . MockSlotInfo . mockSlotInfoWithAge ( 2 ) ; "<AssertPlaceHolder>" ; } hasExpired ( stormpot . SlotInfo ) { return ( firstExpiration . hasExpired ( info ) ) || ( secondExpiration . hasExpired ( info ) ) ; }
org . junit . Assert . assertFalse ( expiration . hasExpired ( info ) )
thatDuplicateProjectsAreFiltered ( ) { java . util . Date snapshotDate = new java . util . Date ( ) ; org . zalando . catwatch . backend . model . Project javaProject = new org . zalando . catwatch . backend . model . Project ( ) ; javaProject . setName ( "Project<sp>1" ) ; javaProject . setPrimaryLanguage ( org . zalando . catwatch . backend . util . LanguageStatsTest . JAVA ) ; javaProject . setSnapshotDate ( snapshotDate ) ; org . zalando . catwatch . backend . model . Project duplicateProject = new org . zalando . catwatch . backend . model . Project ( ) ; duplicateProject . setName ( "Project<sp>1" ) ; duplicateProject . setPrimaryLanguage ( org . zalando . catwatch . backend . util . LanguageStatsTest . JAVA ) ; duplicateProject . setSnapshotDate ( snapshotDate ) ; java . util . List < org . zalando . catwatch . backend . util . LanguageStats > listOfLanguageStats = org . zalando . catwatch . backend . util . LanguageStats . buildStats ( com . google . common . collect . Lists . newArrayList ( javaProject , duplicateProject ) ) ; "<AssertPlaceHolder>" ; } setSnapshotDate ( java . util . Date ) { this . snapshotDate = snapshotDate ; }
org . junit . Assert . assertThat ( listOfLanguageStats . size ( ) , org . hamcrest . core . Is . is ( 1 ) )
save_service_ObjectNotFoundException ( ) { prepareForSave ( ) ; org . oscm . internal . types . exception . ObjectNotFoundException ex = new org . oscm . internal . types . exception . ObjectNotFoundException ( org . oscm . internal . types . exception . DomainObjectException . ClassEnum . SERVICE , "test" ) ; doThrow ( ex ) . when ( org . oscm . ui . beans . PriceModelBeanTest . provisioningService ) . savePriceModelForSubscription ( any ( org . oscm . internal . vo . VOServiceDetails . class ) , any ( org . oscm . internal . vo . VOPriceModel . class ) ) ; try { bean . save ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . oscm . internal . types . exception . ObjectNotFoundException e ) { "<AssertPlaceHolder>" ; throw e ; } } getDomainObjectClassEnum ( ) { return bean . getClassEnum ( ) ; }
org . junit . Assert . assertEquals ( ClassEnum . SERVICE , e . getDomainObjectClassEnum ( ) )
testGetParameter ( ) { net . holmes . core . business . configuration . dao . ConfigurationDao configurationDao = createMock ( net . holmes . core . business . configuration . dao . ConfigurationDao . class ) ; java . lang . Integer port = 8085 ; expect ( configurationDao . getParameter ( eq ( ConfigurationParameter . HTTP_SERVER_PORT ) ) ) . andReturn ( port ) ; replay ( configurationDao ) ; net . holmes . core . business . configuration . ConfigurationManager configurationManager = new net . holmes . core . business . configuration . ConfigurationManagerImpl ( configurationDao ) ; java . lang . Integer result = configurationManager . getParameter ( ConfigurationParameter . HTTP_SERVER_PORT ) ; verify ( configurationDao ) ; "<AssertPlaceHolder>" ; } getParameter ( net . holmes . core . common . ConfigurationParameter ) { return configurationDao . getParameter ( parameter ) ; }
org . junit . Assert . assertEquals ( result , port )
testGetState ( ) { java . lang . String state = "state" ; doReturn ( state ) . when ( schedulerResource . schedulerService ) . getState ( ) ; javax . ws . rs . core . Response mockResponse = mock ( javax . ws . rs . core . Response . class ) ; doReturn ( mockResponse ) . when ( schedulerResource ) . buildPlainTextOkResponse ( state ) ; javax . ws . rs . core . Response testResult = schedulerResource . getState ( ) ; "<AssertPlaceHolder>" ; verify ( schedulerResource . schedulerService , times ( 1 ) ) . getState ( ) ; verify ( schedulerResource , times ( 1 ) ) . buildPlainTextOkResponse ( state ) ; } getState ( ) { if ( editRadioButton . getValue ( ) ) { return org . pentaho . mantle . client . dialogs . ManageContentDialog . STATE . EDIT ; } if ( shareRadioButton . getValue ( ) ) { return org . pentaho . mantle . client . dialogs . ManageContentDialog . STATE . SHARE ; } return org . pentaho . mantle . client . dialogs . ManageContentDialog . STATE . SCHEDULE ; }
org . junit . Assert . assertEquals ( mockResponse , testResult )
testToString_char ( ) { java . lang . String result = charArrayFixture . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return fName ; }
org . junit . Assert . assertNotNull ( result )
getAllSubscriptionsTest ( ) { com . orange . ngsi . model . SubscribeContext subscribeContext = com . orange . cepheus . broker . Util . createSubscribeContextTemperature ( ) ; com . orange . cepheus . broker . model . Subscription subscription = new com . orange . cepheus . broker . model . Subscription ( "12345" , java . time . Instant . now ( ) . plus ( 1 , ChronoUnit . DAYS ) , subscribeContext ) ; subscriptionsRepository . saveSubscription ( subscription ) ; com . orange . ngsi . model . SubscribeContext subscribeContext2 = com . orange . cepheus . broker . Util . createSubscribeContextTemperature ( ) ; com . orange . cepheus . broker . model . Subscription subscription2 = new com . orange . cepheus . broker . model . Subscription ( "12346" , java . time . Instant . now ( ) . plus ( 1 , ChronoUnit . DAYS ) , subscribeContext2 ) ; subscriptionsRepository . saveSubscription ( subscription2 ) ; com . orange . ngsi . model . SubscribeContext subscribeContext3 = com . orange . cepheus . broker . Util . createSubscribeContextTemperature ( ) ; com . orange . cepheus . broker . model . Subscription subscription3 = new com . orange . cepheus . broker . model . Subscription ( "12347" , java . time . Instant . now ( ) . plus ( 1 , ChronoUnit . DAYS ) , subscribeContext3 ) ; subscriptionsRepository . saveSubscription ( subscription3 ) ; "<AssertPlaceHolder>" ; } getAllSubscriptions ( ) { java . util . Map < java . lang . String , com . orange . cepheus . broker . model . Subscription > subscriptions = new java . util . concurrent . ConcurrentHashMap ( ) ; try { java . util . List < com . orange . cepheus . broker . model . Subscription > subscriptionList = jdbcTemplate . query ( "select<sp>id,<sp>expirationDate,<sp>subscribeContext<sp>from<sp>t_subscriptions" , ( java . sql . ResultSet rs , int rowNum ) -> { com . orange . cepheus . broker . model . Subscription subscription = new com . orange . cepheus . broker . model . Subscription ( ) ; try { subscription . setSubscriptionId ( rs . getString ( "id" ) ) ; subscription . setExpirationDate ( java . time . Instant . parse ( rs . getString ( "expirationDate" ) ) ) ; subscription . setSubscribeContext ( mapper . readValue ( rs . getString ( "subscribeContext" ) , . class ) ) ; } catch ( e ) { throw new < com . orange . cepheus . broker . persistence . e > java . sql . SQLException ( ) ; } return subscription ; } ) ; subscriptionList . forEach ( ( subscription ) -> subscriptions . put ( subscription . getSubscriptionId ( ) , subscription ) ) ; } catch ( org . springframework . dao . DataAccessException e ) { throw new com . orange . cepheus . broker . exception . SubscriptionPersistenceException ( e ) ; } return subscriptions ; }
org . junit . Assert . assertEquals ( 3 , subscriptionsRepository . getAllSubscriptions ( ) . size ( ) )
shouldEvaluateTrueIfIncludesMatchAndExcludesEmpty ( ) { java . util . function . Predicate < java . lang . Class < ? > > inner = mock ( java . util . function . Predicate . class ) ; com . oracle . bedrock . testsupport . junit . options . TestClasses . TestMatcher include1 = mock ( TestClasses . TestMatcher . class ) ; com . oracle . bedrock . testsupport . junit . options . TestClasses . TestMatcher include2 = mock ( TestClasses . TestMatcher . class ) ; java . util . Set < com . oracle . bedrock . testsupport . junit . options . TestClasses . TestMatcher > includes = new java . util . HashSet ( java . util . Arrays . asList ( include1 , include2 ) ) ; java . util . Set < com . oracle . bedrock . testsupport . junit . options . TestClasses . TestMatcher > excludes = new java . util . HashSet ( ) ; com . oracle . bedrock . testsupport . junit . options . TestClasses . IncludeExcludePredicate predicate = new com . oracle . bedrock . testsupport . junit . options . TestClasses . IncludeExcludePredicate ( inner , includes , excludes ) ; when ( inner . test ( any ( java . lang . Class . class ) ) ) . thenReturn ( true ) ; when ( include1 . hasClassPattern ( ) ) . thenReturn ( true ) ; when ( include1 . matches ( anyString ( ) ) ) . thenReturn ( false ) ; when ( include2 . hasClassPattern ( ) ) . thenReturn ( true ) ; when ( include2 . matches ( anyString ( ) ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; verify ( include1 , atMost ( 1 ) ) . matches ( com . oracle . bedrock . testsupport . junit . options . Integer . class . getCanonicalName ( ) ) ; verify ( include2 ) . matches ( com . oracle . bedrock . testsupport . junit . options . Integer . class . getCanonicalName ( ) ) ; } test ( T extends com . oracle . bedrock . predicate . Comparable ) { return value == null ? false : ( value . compareTo ( this . value ) ) < 0 ; }
org . junit . Assert . assertThat ( predicate . test ( com . oracle . bedrock . testsupport . junit . options . Integer . class ) , org . hamcrest . CoreMatchers . is ( true ) )
isButtonEnabled_FromDateIsNull ( ) { givenAnyPeriodAndType ( ) ; model . setFromDate ( null ) ; model . setToDate ( new java . util . Date ( java . lang . System . currentTimeMillis ( ) ) ) ; model . setAvailableOperations ( generateAvailableOperations ( ) ) ; boolean result = ctrl . isButtonEnabled ( ) ; "<AssertPlaceHolder>" ; } isButtonEnabled ( ) { return ( ( getSelectedMarketplace ( ) ) != null ) && ( ( getSelectedMarketplace ( ) . length ( ) ) > 0 ) ; }
org . junit . Assert . assertFalse ( result )
testEquals01 ( ) { org . dresdenocl . modelinstancetype . types . IModelInstanceReal modelInstanceReal01 ; modelInstanceReal01 = org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceReal ( new java . lang . Double ( 42.7 ) ) ; org . dresdenocl . modelinstancetype . types . IModelInstanceReal modelInstanceReal02 ; modelInstanceReal02 = org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceReal ( new java . lang . Double ( 42.7 ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceof org . dresdenocl . metamodels . xsd . internal . model . XSDModel ) { return resource . equals ( ( ( org . dresdenocl . metamodels . xsd . internal . model . XSDModel ) ( obj ) ) . resource ) ; } return false ; }
org . junit . Assert . assertTrue ( modelInstanceReal01 . equals ( modelInstanceReal02 ) )
toArraySubclass ( ) { int size = 1024 ; java . lang . Integer [ ] control = new java . lang . Integer [ size ] ; for ( int i = 0 ; i < size ; ++ i ) { control [ i ] = i ; } edu . ucla . sspace . util . SparseIntArray arr = new edu . ucla . sspace . util . SparseIntArray ( ) ; for ( int i = 0 ; i < size ; ++ i ) { arr . set ( control [ i ] , i ) ; } java . lang . Number [ ] test = new java . lang . Number [ size ] ; arr . toArray ( test ) ; "<AssertPlaceHolder>" ; } equals ( edu . ucla . sspace . vector . Vector , edu . ucla . sspace . vector . Vector ) { if ( ( v1 . length ( ) ) == ( v2 . length ( ) ) ) { int length = v1 . length ( ) ; for ( int i = 0 ; i < length ; ++ i ) { java . lang . Number n1 = v1 . getValue ( i ) ; java . lang . Number n2 = v2 . getValue ( i ) ; if ( ! ( n1 . equals ( n2 ) ) ) return false ; } return true ; } return false ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( control , test ) )
testAllDateUsageBetween ( ) { java . util . Map < java . lang . String , java . util . List < com . bc . calvalus . reporting . common . UsageStatistic > > allUsersStartEndDateStatistic = jsonExtractor . getAllDateUsageBetween ( "2017-01-09" , "2017-01-15" ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( allUsersStartEndDateStatistic . size ( ) , 7 )
shouldExecuteSelectAllAuthorsUsingMapperClassThatReturnsVector ( ) { org . apache . ibatis . session . SqlSession session = org . apache . ibatis . session . SqlSessionTest . sqlMapper . openSession ( ) ; try { org . apache . ibatis . domain . blog . mappers . AuthorMapper mapper = session . getMapper ( org . apache . ibatis . domain . blog . mappers . AuthorMapper . class ) ; java . util . Collection < org . apache . ibatis . domain . blog . Author > authors = mapper . selectAllAuthorsVector ( ) ; "<AssertPlaceHolder>" ; } finally { session . close ( ) ; } } size ( ) { return loaderMap . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , authors . size ( ) )
hasNonConfigurableJobChangesFalse ( ) { final org . hisp . dhis . scheduling . JobConfiguration jc = new org . hisp . dhis . scheduling . JobConfiguration ( ) ; jc . setJobType ( JobType . ANALYTICS_TABLE ) ; jc . setJobStatus ( JobStatus . COMPLETED ) ; jc . setJobParameters ( jobParameters ) ; jc . setContinuousExecution ( true ) ; jc . setEnabled ( true ) ; jc . setLeaderOnlyJob ( false ) ; "<AssertPlaceHolder>" ; } hasNonConfigurableJobChanges ( org . hisp . dhis . scheduling . JobConfiguration ) { if ( ( jobType ) != ( jobConfiguration . getJobType ( ) ) ) { return true ; } if ( ( jobStatus ) != ( jobConfiguration . getJobStatus ( ) ) ) { return true ; } if ( ( jobParameters ) != ( jobConfiguration . getJobParameters ( ) ) ) { return true ; } if ( ( continuousExecution ) != ( jobConfiguration . isContinuousExecution ( ) ) ) { return true ; } return ( enabled ) != ( jobConfiguration . isEnabled ( ) ) ; }
org . junit . Assert . assertFalse ( jobConfiguration . hasNonConfigurableJobChanges ( jc ) )
testSerialization ( ) { org . jfree . chart . block . FlowArrangement f1 = new org . jfree . chart . block . FlowArrangement ( org . jfree . ui . HorizontalAlignment . LEFT , org . jfree . ui . VerticalAlignment . TOP , 1.0 , 2.0 ) ; org . jfree . chart . block . FlowArrangement f2 = ( ( org . jfree . chart . block . FlowArrangement ) ( org . jfree . chart . TestUtilities . serialised ( f1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( f1 , f2 )
testCreate ( ) { org . oscarehr . common . model . Facility entity = new org . oscarehr . common . model . Facility ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
testCreateMedicationsSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . DocumentBuilder < org . openhealthtools . mdht . uml . cda . ccd . ContinuityOfCareDocument > clinicalDocumentBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createContinuityOfCareDocumentBuilder ( ) ; org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . ccd . MedicationsSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createMedicationsSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . ccd . MedicationsSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . save ( clinicalDocumentBuilder . with ( section ) . buildDocument ( ) , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
encounterProviderNullTest ( ) { org . marc . everest . rmim . uv . cdar2 . pocd_mt000040uv . Participant2 participant = org . oscarehr . e2e . model . export . body . EncountersModelTest . nullEncountersModel . getEncounterProvider ( ) ; "<AssertPlaceHolder>" ; } getEncounterProvider ( ) { return encounterProvider ; }
org . junit . Assert . assertNotNull ( participant )
testM4Comments2 ( ) { java . lang . String text = "dnl<sp>/*<sp>word(`quoted\')\n" + "*/\n" ; org . eclipse . jface . text . IDocument document = createDocument ( text ) ; org . eclipse . cdt . autotools . ui . editors . parser . AutoconfTokenizer tokenizer = createTokenizer ( document ) ; tokenizer . setM4Context ( true ) ; tokenizer . setM4Comment ( "/*" , "*/" ) ; java . util . List < org . eclipse . cdt . autotools . ui . editors . parser . Token > tokens = tokenize ( tokenizer ) ; "<AssertPlaceHolder>" ; checkToken ( tokens . get ( 0 ) , document , ITokenConstants . WORD , "dnl" ) ; checkToken ( tokens . get ( 1 ) , document , ITokenConstants . M4_COMMENT , "/*<sp>word(`quoted\')\n*/" ) ; checkToken ( tokens . get ( 2 ) , document , ITokenConstants . EOL , "\n" ) ; } size ( ) { return fSize ; }
org . junit . Assert . assertEquals ( 3 , tokens . size ( ) )
testSayHelloMessage ( ) { java . lang . String receive ; java . lang . String waiting = "HelloWorld" ; receive = org . bonita . lib . projet . LibJava . sayHelloMessage ( ) ; "<AssertPlaceHolder>" ; } sayHelloMessage ( ) { try { return "HelloWorld" ; } catch ( java . lang . Exception e ) { org . bonita . lib . projet . LibJava . traceExeption ( e ) ; return null ; } }
org . junit . Assert . assertEquals ( receive , waiting )
idleCanBeSet ( ) { settings . setIdle ( true ) ; "<AssertPlaceHolder>" ; } useIdle ( ) { return ( ( java . lang . Boolean ) ( options . get ( com . opera . core . systems . OperaSettings . Capability . OPERAIDLE ) . getValue ( ) ) ) ; }
org . junit . Assert . assertEquals ( true , settings . useIdle ( ) )
getPeilDatum ( ) { final nl . bzk . brp . bijhouding . bericht . model . DatumElement vandaag = new nl . bzk . brp . bijhouding . bericht . model . DatumElement ( nl . bzk . algemeenbrp . util . common . DatumUtil . vandaag ( ) ) ; final nl . bzk . brp . bijhouding . bericht . model . BijhoudingVerzoekBericht bericht = mock ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingVerzoekBericht . class ) ; when ( bericht . getDatumOntvangst ( ) ) . thenReturn ( vandaag ) ; final nl . bzk . brp . bijhouding . bericht . model . HuwelijkElement huwelijkElement = builder . maakHuwelijkElement ( "CI_huwelijk" , builder . maakRelatieGroepElement ( "CI_relatie" , new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . RelatieGroepParameters ( ) ) , java . util . Collections . emptyList ( ) ) ; final nl . bzk . brp . bijhouding . bericht . model . VervalHuwelijkActieElement actieElement = new nl . bzk . brp . bijhouding . bericht . model . VervalHuwelijkActieElement ( actieAttributen , datumAanvangGeldigheid , null , null , null , huwelijkElement ) ; actieElement . setVerzoekBericht ( bericht ) ; "<AssertPlaceHolder>" ; } getPeilDatum ( ) { return huwelijkOfGp . getRelatieGroep ( ) . getDatumAanvang ( ) ; }
org . junit . Assert . assertEquals ( vandaag , actieElement . getPeilDatum ( ) )
isDestroyedWithZeroHitPoints ( ) { hitPointBasedDestructibility . reduce ( com . fundynamic . d2tm . game . behaviors . HitPointBasedDestructibilityTest . MAX_HIT_POINTS ) ; "<AssertPlaceHolder>" ; } isZero ( ) { return ( ( getXAsInt ( ) ) == 0 ) && ( ( getYAsInt ( ) ) == 0 ) ; }
org . junit . Assert . assertTrue ( hitPointBasedDestructibility . isZero ( ) )
testSecureClient ( ) { org . codice . ddf . cxf . client . SecureCxfClientFactory < org . codice . ddf . cxf . SecureCxfClientFactoryTest . IDummy > secureCxfClientFactory = new org . codice . ddf . cxf . client . impl . SecureCxfClientFactoryImpl ( org . codice . ddf . cxf . SecureCxfClientFactoryTest . SECURE_ENDPOINT , org . codice . ddf . cxf . SecureCxfClientFactoryTest . IDummy . class ) ; org . codice . ddf . cxf . SecureCxfClientFactoryTest . IDummy client = secureCxfClientFactory . getClient ( ) ; "<AssertPlaceHolder>" ; } hasEcpEnabled ( java . lang . Object ) { org . apache . cxf . jaxrs . client . ClientConfiguration clientConfig = org . apache . cxf . jaxrs . client . WebClient . getConfig ( client ) ; return ( clientConfig . getOutInterceptors ( ) . stream ( ) . anyMatch ( ( i ) -> i instanceof org . codice . ddf . cxf . paos . PaosOutInterceptor ) ) && ( clientConfig . getInInterceptors ( ) . stream ( ) . anyMatch ( ( i ) -> i instanceof org . codice . ddf . cxf . paos . PaosInInterceptor ) ) ; }
org . junit . Assert . assertThat ( hasEcpEnabled ( client ) , org . hamcrest . Matchers . is ( true ) )
testQueryStringMissingOperator ( ) { try { java . lang . String queryString = "key4" ; java . net . URI requestUri = new java . net . URI ( ( ( ( org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . URI_STRING ) + "?" ) + queryString ) ) ; when ( uriInfo . getRequestUri ( ) ) . thenReturn ( requestUri ) ; } catch ( java . net . URISyntaxException urise ) { "<AssertPlaceHolder>" ; } org . slc . sli . api . service . query . UriInfoToApiQueryConverterTest . QUERY_CONVERTER . convert ( uriInfo ) ; } getRequestUri ( ) { return this . uri ; }
org . junit . Assert . assertTrue ( false )
test ( ) { java . util . Map < java . lang . String , org . jmxtrans . embedded . Query > queries = org . jmxtrans . embedded . TestUtils . indexQueriesByAliasOrName ( embeddedJmxTrans . getQueries ( ) ) ; org . jmxtrans . embedded . Query tomcatProcessorQuery = queries . get ( "tomcat.global-request-processor.http-nio" ) ; "<AssertPlaceHolder>" ; } getQueries ( ) { return queries ; }
org . junit . Assert . assertNotNull ( tomcatProcessorQuery )
TestAddIndex ( ) { java . util . Map < java . lang . String , java . lang . Object > data = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; data . put ( "replicas" , 0 ) ; data . put ( "shards" , 1 ) ; data . put ( "writeConsistency" , "one" ) ; java . lang . String appId = this . clientSetup . getAppUuid ( ) ; org . apache . usergrid . rest . test . resource . model . ApiResponse node = null ; try { javax . ws . rs . client . WebTarget resource = this . clientSetup . getRestClient ( ) . pathResource ( ( "/system/index/" + appId ) ) . getTarget ( ) ; org . glassfish . jersey . client . authentication . HttpAuthenticationFeature feature = org . glassfish . jersey . client . authentication . HttpAuthenticationFeature . basicBuilder ( ) . credentials ( "superuser" , "superpassword" ) . build ( ) ; node = resource . register ( feature ) . request ( ) . accept ( MediaType . APPLICATION_JSON ) . get ( org . apache . usergrid . rest . test . resource . model . ApiResponse . class ) ; } catch ( java . lang . Exception e ) { org . apache . usergrid . rest . IndexResourceIT . LOG . error ( "failed" , e ) ; org . junit . Assert . fail ( e . toString ( ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return getHostname ( ) ; }
org . junit . Assert . assertNotNull ( node )
testProductIdentification ( ) { byte [ ] productIdentification = new byte [ 16 ] ; java . util . Random random = new java . util . Random ( ) ; random . nextBytes ( productIdentification ) ; java . io . ByteArrayOutputStream byteOut = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dataOut = new java . io . DataOutputStream ( byteOut ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . write ( productIdentification ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; dataOut . writeLong ( 0 ) ; org . jscsi . scsi . protocol . inquiry . StandardInquiryData sid = new org . jscsi . scsi . protocol . inquiry . StandardInquiryData ( ) ; sid . decode ( java . nio . ByteBuffer . wrap ( byteOut . toByteArray ( ) ) ) ; sid . decode ( java . nio . ByteBuffer . wrap ( sid . encode ( ) ) ) ; byte [ ] returnedProductIdentification = sid . getProductIdentification ( ) ; "<AssertPlaceHolder>" ; } getProductIdentification ( ) { return this . productIdentification ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( returnedProductIdentification , productIdentification ) )
testConvertNetwork ( ) { System . out . println ( "convertNetwork" ) ; org . genemania . engine . actions . support . UserNetworkProcessor instance = new org . genemania . engine . actions . support . UserNetworkProcessor ( randomCacheBuilder . getCache ( ) , randomCacheBuilder . getCacheDir ( ) ) ; org . genemania . dto . UploadNetworkEngineRequestDto request = new org . genemania . dto . UploadNetworkEngineRequestDto ( ) ; request . setLayout ( DataLayout . PROFILE ) ; request . setMethod ( NetworkProcessingMethod . PEARSON ) ; request . setNamespace ( "user1" ) ; request . setProgressReporter ( org . genemania . util . NullProgressReporter . instance ( ) ) ; request . setOrganismId ( 1 ) ; request . setNetworkId ( ( - 1 ) ) ; request . setSparsification ( 50 ) ; java . lang . String data = "id\tf1\tf2\tf3\n10000\t1.5\t3.0\t4.0\n10001\t2.0\t2.2\t2.1\n" ; request . setData ( new java . io . StringReader ( data ) ) ; org . genemania . engine . matricks . SymMatrix result = instance . convertNetwork ( request ) ; "<AssertPlaceHolder>" ; } convertNetwork ( org . genemania . dto . UploadNetworkEngineRequestDto ) { org . genemania . engine . matricks . SymMatrix matrix = null ; if ( ( ( request . getMethod ( ) ) == ( org . genemania . type . NetworkProcessingMethod . PEARSON ) ) && ( ( request . getLayout ( ) ) == ( org . genemania . type . DataLayout . PROFILE ) ) ) { org . genemania . engine . core . evaluation . ProfileToNetworkDriver p2n = new org . genemania . engine . core . evaluation . ProfileToNetworkDriver ( ) ; try { java . io . File tempFile = getTempFile ( request . getNamespace ( ) , ( ( int ) ( request . getOrganismId ( ) ) ) , ( ( int ) ( request . getNetworkId ( ) ) ) ) ; org . genemania . engine . actions . support . UserNetworkProcessor . logger . debug ( ( "writing<sp>temp<sp>output<sp>to<sp>" + tempFile ) ) ; java . io . Writer result = new java . io . BufferedWriter ( new java . io . FileWriter ( tempFile ) ) ; try { p2n . setSynReader ( makeIdMapping ( ( ( int ) ( request . getOrganismId ( ) ) ) ) ) ; p2n . setNoHeader ( true ) ; p2n . setK ( request . getSparsification ( ) ) ; p2n . setCorrelationType ( CorrelationType . PEARSON ) ; p2n . setProfileType ( "CONTINUOUS" ) ; p2n . setProgressReporter ( request . getProgressReporter ( ) ) ; p2n . process ( request . getData ( ) , result ) ; } finally { result . close ( ) ; } matrix = convertToMatrixRepresentation ( request . getOrganismId ( ) , request . getNetworkId ( ) , request . getNamespace ( ) , request . getProgressReporter ( ) , false ) ; } catch ( java . io . IOException e ) { throw new org . genemania . exception . ApplicationException ( "Failed<sp>to<sp>convert<sp>profile<sp>to<sp>network" , e ) ; } } else if ( ( ( request . getMethod ( ) ) == ( org . genemania . type . NetworkProcessingMethod . DIRECT ) ) && ( ( request . getLayout ( ) ) == ( org . genemania . type . DataLayout . WEIGHTED_NETWORK ) ) ) { try { java . io . File tempFile = getTempFile ( request . getNamespace ( ) , ( ( int ) ( request . getOrganismId ( ) ) ) , ( ( int ) ( request . getNetworkId ( ) ) ) ) ; org . genemania . engine . actions . support . UserNetworkProcessor . logger . debug ( ( "writing<sp>temp<sp>output<sp>to<sp>" + tempFile ) ) ; java . io . Writer result = new java . io . BufferedWriter ( new java . io . FileWriter ( tempFile ) ) ; try { char [ ] buf = new char [ 1024 ] ; java . io . Reader data = request . getData ( ) ; int n ; while ( ( n = data . read ( buf ) ) > 0 ) { result . write ( buf , 0 , n ) ; } } finally { result . close ( ) ; } matrix = convertToMatrixRepresentation ( request . getOrganismId ( ) , request . getNetworkId ( ) , request . getNamespace ( ) , request . getProgressReporter ( ) , false ) ; } catch ( java . lang . Exception e ) { throw new org . genemania . exception . ApplicationException ( "Failed<sp>to<sp>load<sp>direct<sp>network" , e ) ; } } else if ( ( ( request . getMethod ( ) ) == ( org . genemania . type . NetworkProcessingMethod . DIRECT ) ) && ( ( request . getLayout ( ) ) == ( org . genemania . type . DataLayout . BINARY_NETWORK ) ) ) { try { java . io . File tempFile = getTempFile ( request . getNamespace ( ) , ( ( int ) ( request . getOrganismId ( ) ) ) , ( ( int ) ( request . getNetworkId ( ) ) ) ) ; org . genemania . engine . actions . support . UserNetworkProcessor . logger . debug ( ( "writing<sp>temp<sp>output<sp>to<sp>" + tempFile ) ) ; java . io . Writer result = new java . io . BufferedWriter ( new java . io . FileWriter ( tempFile ) ) ; try { char [ ] buf = new char [ 1024 ] ; java . io . Reader data = request . getData ( ) ; int n ; while ( ( n = data . read ( buf ) ) > 0 ) { result . write ( buf , 0 , n ) ; } } finally { result . close ( ) ; } matrix = convertToMatrixRepresentation
org . junit . Assert . assertNotNull ( result )
testConstructorsWithNullArguments ( ) { org . hl7 . fhir . dstu2016may . model . IdType id = new org . hl7 . fhir . dstu2016may . model . IdType ( null , null , null ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return ( this . value ) == null ? null : this . value . getValue ( ) ; }
org . junit . Assert . assertEquals ( null , id . getValue ( ) )
testTextToDateTime ( ) { com . dremio . dac . model . job . JobDataFragment data = testConvert ( "to_timestamp(l_commitdate,<sp>'YYYY-MM-DD')<sp>as<sp>foo" , new com . dremio . dac . proto . model . dataset . FieldConvertTextToDate ( "YYYY-MM-DD" ) . setDesiredType ( com . dremio . dac . server . DATETIME ) , "l_commitdate" , "cp.\"tpch/lineitem.parquet\"" ) ; "<AssertPlaceHolder>" ; } getColumn ( java . lang . String ) { return nameToColumns . get ( name ) ; }
org . junit . Assert . assertEquals ( com . dremio . dac . server . DATETIME , data . getColumn ( "foo" ) . getType ( ) )
testClear ( ) { context . put ( "test" , "1" ) ; context . clear ( ) ; "<AssertPlaceHolder>" ; } getInteger ( java . lang . String ) { return getInteger ( key , null ) ; }
org . junit . Assert . assertNull ( context . getInteger ( "test" ) )
testDoGetContentCreator ( ) { org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto mockRepositoryFileDto = mock ( org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto . class ) ; doReturn ( mockRepositoryFileDto ) . when ( fileResource . fileService ) . doGetContentCreator ( org . pentaho . platform . web . http . api . resources . FileResourceTest . PATH_ID ) ; org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto testDto = fileResource . doGetContentCreator ( org . pentaho . platform . web . http . api . resources . FileResourceTest . PATH_ID ) ; "<AssertPlaceHolder>" ; verify ( fileResource . fileService , times ( 1 ) ) . doGetContentCreator ( org . pentaho . platform . web . http . api . resources . FileResourceTest . PATH_ID ) ; } doGetContentCreator ( java . lang . String ) { org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto file = getRepoWs ( ) . getFile ( idToPath ( pathId ) ) ; if ( file == null ) { throw new java . io . FileNotFoundException ( ) ; } java . util . Map < java . lang . String , java . io . Serializable > fileMetadata = getRepository ( ) . getFileMetadata ( file . getId ( ) ) ; java . lang . String creatorId = ( ( java . lang . String ) ( fileMetadata . get ( PentahoJcrConstants . PHO_CONTENTCREATOR ) ) ) ; if ( ( creatorId != null ) && ( ( creatorId . length ( ) ) > 0 ) ) { return getRepoWs ( ) . getFileById ( creatorId ) ; } return null ; }
org . junit . Assert . assertEquals ( mockRepositoryFileDto , testDto )
testRequestWhileProcessingOnNext ( ) { final java . util . List < java . util . List < java . lang . Integer > > list = new java . util . ArrayList < java . util . List < java . lang . Integer > > ( ) ; org . reactivestreams . Subscriber < java . util . List < java . lang . Integer > > subscriber = new org . reactivestreams . Subscriber < java . util . List < java . lang . Integer > > ( ) { private org . reactivestreams . Subscription parent ; @ com . github . davidmoten . rx2 . internal . flowable . Override public void onSubscribe ( org . reactivestreams . Subscription s ) { this . parent = s ; parent . request ( 1 ) ; } @ com . github . davidmoten . rx2 . internal . flowable . Override public void onNext ( java . util . List < java . lang . Integer > a ) { list . add ( a ) ; parent . request ( 1 ) ; } @ com . github . davidmoten . rx2 . internal . flowable . Override public void onError ( java . lang . Throwable e ) { } @ com . github . davidmoten . rx2 . internal . flowable . Override public void onComplete ( ) { } } ; io . reactivex . Flowable . just ( 3 , 4 , 5 , 6 ) . compose ( com . github . davidmoten . rx2 . flowable . Transformers . toListWhile ( com . github . davidmoten . rx2 . internal . flowable . FlowableCollectWhileTest . BUFFER_TWO ) ) . subscribe ( subscriber ) ; "<AssertPlaceHolder>" ; } subscribe ( io . reactivex . FlowableEmitter ) { io . reactivex . FlowableEmitter < Out > w = com . github . davidmoten . rx2 . internal . flowable . TransformerStateMachine . wrap ( emitter ) ; if ( in . isOnNext ( ) ) { state . value = transition . apply ( state . value , in . getValue ( ) , w ) ; if ( ! ( emitter . isCancelled ( ) ) ) emitter . onComplete ( ) ; else { emitter . onNext ( com . github . davidmoten . rx2 . internal . flowable . TransformerStateMachine . UnsubscribedNotificationHolder . < Out > unsubscribedNotification ( ) ) ; } } else if ( in . isOnComplete ( ) ) { if ( ( completion . test ( state . value , w ) ) && ( ! ( emitter . isCancelled ( ) ) ) ) { w . onComplete ( ) ; } } else if ( ! ( emitter . isCancelled ( ) ) ) { w . onError ( in . getError ( ) ) ; } }
org . junit . Assert . assertEquals ( list , java . util . Arrays . asList ( com . github . davidmoten . rx2 . internal . flowable . FlowableCollectWhileTest . list ( 3 , 4 ) , com . github . davidmoten . rx2 . internal . flowable . FlowableCollectWhileTest . list ( 5 , 6 ) ) )
isReady_serverReturnsNullResponse ( ) { final uk . co . flax . biosolr . ontology . config . SolrConfiguration config = mock ( uk . co . flax . biosolr . ontology . config . SolrConfiguration . class ) ; org . apache . solr . client . solrj . SolrClient server = mock ( org . apache . solr . client . solrj . SolrClient . class ) ; when ( server . ping ( ) ) . thenReturn ( null ) ; uk . co . flax . biosolr . ontology . storage . StorageEngine engine = new uk . co . flax . biosolr . ontology . storage . solr . SolrStorageEngine ( config , server ) ; "<AssertPlaceHolder>" ; verify ( server ) . ping ( ) ; } isReady ( ) { uk . co . flax . biosolr . ontology . documents . storage . elasticsearch . ClusterHealthResponse response = client . admin ( ) . cluster ( ) . health ( new uk . co . flax . biosolr . ontology . documents . storage . elasticsearch . ClusterHealthRequestBuilder ( client , ClusterHealthAction . INSTANCE ) . request ( ) ) . actionGet ( ) ; return ( ! ( response . isTimedOut ( ) ) ) && ( ( ( response . getStatus ( ) ) == ( ClusterHealthStatus . GREEN ) ) || ( ( response . getStatus ( ) ) == ( ClusterHealthStatus . YELLOW ) ) ) ; }
org . junit . Assert . assertFalse ( engine . isReady ( ) )
testMetaStoreBasics ( ) { org . pentaho . metastore . api . IMetaStore metaStore = repository . getMetaStore ( ) ; "<AssertPlaceHolder>" ; org . pentaho . di . repository . pur . metastore . MetaStoreTestBase base = new org . pentaho . di . repository . pur . metastore . MetaStoreTestBase ( ) ; base . testFunctionality ( metaStore ) ; } getMetaStore ( ) { return metaStore ; }
org . junit . Assert . assertNotNull ( metaStore )
testTimeStampExtraction_ValidationFailure ( ) { com . hortonworks . streamline . streams . runtime . storm . bolt . query . ArrayList < org . apache . storm . tuple . Tuple > usersAndCities = com . hortonworks . streamline . streams . runtime . storm . bolt . query . TestWindowedQueryBolt . makeStreamLineEventStream ( "users" , userFields , users ) ; usersAndCities . addAll ( com . hortonworks . streamline . streams . runtime . storm . bolt . query . TestWindowedQueryBolt . makeStreamLineEventStream ( "cities" , cityFields , cities ) ) ; com . hortonworks . streamline . streams . runtime . storm . bolt . query . SLMultistreamTimestampExtractor tsExtractor = new com . hortonworks . streamline . streams . runtime . storm . bolt . query . SLMultistreamTimestampExtractor ( com . hortonworks . streamline . streams . runtime . storm . bolt . query . Collections . singletonList ( "users:userId" ) ) ; for ( org . apache . storm . tuple . Tuple userOrCity : usersAndCities ) { long l = tsExtractor . extractTimestamp ( userOrCity ) ; "<AssertPlaceHolder>" ; } } extractTimestamp ( org . apache . storm . tuple . Tuple ) { com . hortonworks . streamline . streams . runtime . storm . bolt . query . FieldSelector tsFieldSel = tsFields . get ( tuple . getSourceStreamId ( ) ) ; if ( tsFieldSel == null ) { throw new java . lang . IllegalArgumentException ( ( ( "Unrecognized<sp>source<sp>stream<sp>in<sp>Event:<sp>'" + ( tuple . getSourceStreamId ( ) ) ) + "'" ) ) ; } java . lang . Object tsField = tsFieldSel . findField ( tuple ) ; if ( tsField == null ) { throw new java . lang . IllegalArgumentException ( ( ( "Timestamp<sp>field<sp>not<sp>found<sp>in<sp>event<sp>:<sp>'" + ( tsFieldSel . outputName ) ) + "'" ) ) ; } return java . lang . Long . parseLong ( tsField . toString ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( l > 0 ) && ( l <= 10 ) ) )
testSplitMerge63 ( ) { java . util . Random rnd = new java . util . Random ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { long [ ] l = new long [ ] { ( rnd . nextLong ( ) ) > > > 1 , ( rnd . nextLong ( ) ) > > > 1 } ; int [ ] x = ch . ethz . globis . phtree . util . BitTools . merge ( 63 , l ) ; long [ ] l2 = ch . ethz . globis . phtree . util . BitTools . split ( 2 , 63 , x ) ; "<AssertPlaceHolder>" ; } } split ( int , int , int [ ] ) { long [ ] trg = new long [ dims ] ; long maskTrg = 1L << ( nBitsPerValue - 1 ) ; for ( int k = 0 ; k < nBitsPerValue ; k ++ ) { for ( int j = 0 ; j < ( trg . length ) ; j ++ ) { int posBit = ( k * ( trg . length ) ) + j ; boolean bit = ch . ethz . globis . phtree . util . BitsInt . getBit ( toSplit , posBit ) ; if ( bit ) { trg [ j ] |= maskTrg ; } } maskTrg >>>= 1 ; } return trg ; }
org . junit . Assert . assertArrayEquals ( l , l2 )
testCmdLineHelp ( ) { @ dk . alexandra . fresco . demo . SuppressWarnings ( "rawtypes" ) dk . alexandra . fresco . demo . cli . CmdLineUtil cmd = new dk . alexandra . fresco . demo . cli . CmdLineUtil ( ) ; cmd . addOption ( new org . apache . commons . cli . Option ( "fancy" , "fancy<sp>option" ) ) ; org . apache . commons . cli . CommandLine line = cmd . parse ( getArgs ( 1 , "dummybool" , "-h" ) ) ; "<AssertPlaceHolder>" ; } getArgs ( int , java . lang . String , java . lang . String [ ] ) { java . util . List < java . lang . String > defaultArgs = new java . util . ArrayList ( java . util . Arrays . asList ( "-e" , "SEQUENTIAL_BATCHED" , "-i" , ( "" + partyId ) , "-p" , "1:localhost:8081" , "-p" , "2:localhost:8082" , "-s" , protocolSuite ) ) ; defaultArgs . addAll ( java . util . Arrays . asList ( addedOptions ) ) ; return defaultArgs . toArray ( new java . lang . String [ ] { } ) ; }
org . junit . Assert . assertNull ( line )
should_refresh ( ) { final java . lang . String name = "testRefresh" ; org . apache . deltaspike . data . test . domain . Simple simple = testData . createSimple ( name ) ; simple . setName ( "override" ) ; repo . refresh ( simple ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( name , simple . getName ( ) )