input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldNotMatchLiteralNotInLexicalSpace ( ) { when ( literal . getLiteral ( ) ) . thenReturn ( "abc" ) ; "<AssertPlaceHolder>" ; } matches ( org . semanticweb . owlapi . model . OWLEntity ) { java . util . Map < org . semanticweb . owlapi . model . OWLAnnotationProperty , com . google . common . collect . Multiset < jav... | org . junit . Assert . assertThat ( matcher . matches ( literal ) , org . hamcrest . Matchers . is ( false ) ) |
getClientTest ( ) { java . lang . String seed = org . apache . commons . lang . RandomStringUtils . randomAlphanumeric ( 30 ) ; when ( daoMock . findByClientId ( anyString ( ) , anyLong ( ) ) ) . thenReturn ( getClientDetailsEntity ( seed ) ) ; org . orcid . jaxb . model . v3 . rc2 . client . Client client = clientMana... | org . junit . Assert . assertEquals ( getClient ( seed ) , client ) |
compareToWhenThisTechnicalKeyIsSetShouldReturnEqual ( ) { java . lang . String technicalKey = "technicalKey" ; ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty other = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . build ( ) ; resourceEditProperty = new... | org . junit . Assert . assertEquals ( 0 , compareTo ) |
sortTest ( ) { int [ ] input = new int [ ] { 29 , 10 , 14 , 37 , 13 } ; int [ ] output = new int [ ] { 10 , 13 , 14 , 29 , 37 } ; chapter3 . heapsort . HeapSort heapSort = new chapter3 . heapsort . ILhyunHeapSort ( ) ; int [ ] result = heapSort . sort ( input ) ; for ( int i = 0 ; i < ( input . length ) ; i ++ ) { "<As... | org . junit . Assert . assertThat ( result [ i ] , org . hamcrest . CoreMatchers . is ( output [ i ] ) ) |
testCreate ( ) { java . lang . String sql = "CREATE<sp>LOCAL<sp>TEMPORARY<sp>TABLE<sp>temp_table<sp>(column1<sp>string)" ; org . teiid . query . resolver . Command c = helpResolve ( sql ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( this... | org . junit . Assert . assertEquals ( sql , c . toString ( ) ) |
testCreation_withSubscriptionHistoriesEmpty ( ) { java . util . List < org . oscm . domobjects . SubscriptionHistory > subscriptionHistories = new java . util . ArrayList ( ) ; historyData = spy ( new org . oscm . billingservice . service . model . BillingSubscriptionHistoryData ( subscriptionHistories ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( true , historyData . getSubscriptionKeys ( ) . isEmpty ( ) ) |
testEndsWithCarriageReturnNewLine ( ) { final java . util . List < java . lang . String > lines = getLines ( "ABC\r\n" ) ; "<AssertPlaceHolder>" ; } getLines ( java . lang . String ) { return getLines ( text , 8192 , 8192 ) ; } | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "ABC\r\n" ) , lines ) |
filterOrderForThreeWithAddFirstForFirst ( ) { java . awt . image . BufferedImage img = new java . awt . image . BufferedImage ( 200 , 200 , java . awt . image . BufferedImage . TYPE_INT_ARGB ) ; final java . util . List < java . lang . Integer > order = new java . util . ArrayList < java . lang . Integer > ( ) ; net . ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 , 2 , 3 ) , order ) |
nestedPropertyFoundSincePropertyIsSet ( ) { final java . lang . String finalName = "buildmetadata-maven-plugin-1.0.0.jar" ; final org . apache . maven . model . Build build = new org . apache . maven . model . Build ( ) ; build . setFinalName ( finalName ) ; projectModel . setBuild ( build ) ; final java . lang . Strin... | org . junit . Assert . assertEquals ( finalName , value ) |
testGetAccessibleMethodInaccessible ( ) { java . lang . reflect . Method expected = org . apache . commons . lang3 . reflect . MethodUtilsTest . TestBean . class . getDeclaredMethod ( "privateStuff" ) ; java . lang . reflect . Method actual = org . apache . commons . lang3 . reflect . MethodUtils . getAccessibleMethod ... | org . junit . Assert . assertNull ( actual ) |
nestCompletionWithEmptyCompletionHandler ( ) { java . util . List < java . lang . Integer > list = new java . util . ArrayList ( ) ; com . vmware . xenon . common . Operation op = com . vmware . xenon . common . Operation . createGet ( this . host . getUri ( ) ) ; op . nestCompletion ( ( o , e ) -> { list . add ( 1 ) ;... | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 2 , 1 , 10 , 20 } , list . toArray ( new java . lang . Integer [ list . size ( ) ] ) ) |
testForVarCharArray ( ) { java . lang . String [ ] strArr = new java . lang . String [ 2 ] ; strArr [ 0 ] = "ram" ; strArr [ 1 ] = "krishna" ; com . salesforce . phoenix . schema . PhoenixArray arr = com . salesforce . phoenix . schema . PArrayDataType . instantiatePhoenixArray ( PDataType . VARCHAR , strArr ) ; byte [... | org . junit . Assert . assertEquals ( arr , resultArr ) |
testParseShort ( ) { for ( int x = Short . MIN_VALUE ; x < ( Short . MAX_VALUE ) ; x ++ ) { try ( final java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; final java . io . DataOutputStream dos = new java . io . DataOutputStream ( baos ) ) { dos . writeShort ( x ) ; dos . close ( ) ; "... | org . junit . Assert . assertEquals ( ( ( short ) ( x ) ) , com . amazonaws . encryptionsdk . internal . PrimitivesParser . parseShort ( baos . toByteArray ( ) , 0 ) ) |
return_current_revision ( ) { final java . lang . String revision = org . ektorp . impl . UUID . randomUUID ( ) . toString ( ) ; doReturn ( new org . ektorp . impl . HttpResponseStub ( 200 , "" ) { @ org . ektorp . impl . Override public java . lang . String getETag ( ) { return revision ; } } ) . when ( httpClient ) .... | org . junit . Assert . assertEquals ( revision , currentRevision ) |
createReader ( ) { java . io . InputStream content = new java . io . ByteArrayInputStream ( org . apache . olingo . odata2 . core . commons . XmlHelperTest . XML . getBytes ( "UTF-8" ) ) ; javax . xml . stream . XMLStreamReader streamReader = org . apache . olingo . odata2 . core . commons . XmlHelper . createStreamRea... | org . junit . Assert . assertNotNull ( streamReader ) |
testInvokeVarargsCoerce04 ( ) { javax . el . BeanELResolver resolver = new javax . el . BeanELResolver ( ) ; javax . el . ELContext context = new javax . el . StandardELContext ( javax . el . ELManager . getExpressionFactory ( ) ) ; java . lang . Object result = resolver . invoke ( context , new javax . el . TesterBean... | org . junit . Assert . assertEquals ( javax . el . TestBeanELResolver . BEAN_NAME , result ) |
setPropertyValueOnResourceRelationForContextShouldThrowExceptionWhenPropertyNotFound ( ) { java . lang . String resourceGroupName = "resourceGroupName" ; java . lang . String releaseName = "releaseName" ; java . lang . String relatedResourceGroupName = "relatedResourceGroupName" ; java . lang . String relatedResourceRe... | org . junit . Assert . assertTrue ( properties . isEmpty ( ) ) |
testSetMessage ( ) { webSearchAction . setMessage ( "foo" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; } | org . junit . Assert . assertEquals ( "foo" , text . getMessage ( ) ) |
testCompute ( ) { org . apache . druid . query . aggregation . post . JavaScriptPostAggregator javaScriptPostAggregator ; java . util . Map < java . lang . String , java . lang . Object > metricValues = new java . util . HashMap ( ) ; metricValues . put ( "delta" , ( - 10.0 ) ) ; metricValues . put ( "total" , 100.0 ) ... | org . junit . Assert . assertEquals ( 10.0 , javaScriptPostAggregator . compute ( metricValues ) ) |
testCompareToWithSameInstantSameResolutions ( ) { au . gov . ga . earthsci . core . temporal . BigTime t1 = new au . gov . ga . earthsci . core . temporal . BigTime ( 1000 , BigTime . NANOSECOND_RESOLUTION ) ; au . gov . ga . earthsci . core . temporal . BigTime t2 = new au . gov . ga . earthsci . core . temporal . Big... | org . junit . Assert . assertTrue ( ( ( t1 . compareTo ( t2 ) ) == 0 ) ) |
testGetHasTypeRefs ( ) { final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > actualHasTypeRefs = literalExpression . getHasTypeRefs ( ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > expectedHasTypeRefs = singletonList ( ... | org . junit . Assert . assertEquals ( expectedHasTypeRefs , actualHasTypeRefs ) |
deleteQuietlyNonExistent ( ) { java . io . File testFile = new java . io . File ( tempFolder . getRoot ( ) , "testDeleteQuietlyNonExistent" ) ; "<AssertPlaceHolder>" ; org . apache . maven . shared . utils . io . FileUtils . deleteDirectory ( testFile ) ; } | org . junit . Assert . assertThat ( testFile . exists ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testSeveralSegments ( ) { org . apache . commons . math3 . geometry . euclidean . twod . SubLine twoSubs = new org . apache . commons . math3 . geometry . euclidean . twod . SubLine ( new org . apache . commons . math3 . geometry . euclidean . twod . Line ( new org . apache . commons . math3 . geometry . euclidean . tw... | org . junit . Assert . assertEquals ( 2 , segments . size ( ) ) |
validate_shouldReturnImmediatelyIfValidationIsDisabledAndHaveNoErrors ( ) { java . lang . Boolean prevVal = org . openmrs . validator . ValidateUtil . getDisableValidation ( ) ; org . openmrs . validator . ValidateUtil . setDisableValidation ( true ) ; try { org . openmrs . Patient patient = new org . openmrs . Patient... | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testFindJobInstanceByExecution ( ) { org . springframework . batch . core . JobInstance jobInstance = dao . createJobInstance ( "testInstance" , new org . springframework . batch . core . JobParameters ( ) ) ; org . springframework . batch . core . JobExecution jobExecution = new org . springframework . batch . core . ... | org . junit . Assert . assertEquals ( jobInstance , returnedInstance ) |
testRender ( ) { final java . lang . String templateVariable = "Hello<sp>Soy!" ; final java . util . Map < java . lang . String , java . lang . Object > model = new java . util . HashMap ( ) ; model . put ( "message" , templateVariable ) ; final java . lang . String expected = java . lang . String . format ( "<h1>%s</h... | org . junit . Assert . assertEquals ( expected , actual ) |
testHandleExceptionWithMessageProcessorsChangingEvent ( ) { org . mule . runtime . core . api . event . CoreEvent lastEventCreated = org . mule . runtime . core . internal . message . InternalEvent . builder ( context ) . message ( of ( "" ) ) . build ( ) ; onErrorContinueHandler . setMessageProcessors ( asList ( creat... | org . junit . Assert . assertThat ( exceptionHandlingResult . getCorrelationId ( ) , org . hamcrest . core . Is . is ( lastEventCreated . getCorrelationId ( ) ) ) |
testHashRoundSpeed ( ) { int cryptIterations = 2 ^ 11 ; int numberOfTests = 10 ; org . apache . usergrid . security . crypto . command . BcryptCommand command = new org . apache . usergrid . security . crypto . command . BcryptCommand ( ) ; command . setDefaultIterations ( cryptIterations ) ; java . lang . String baseS... | org . junit . Assert . assertArrayEquals ( result , authed ) |
test_ofDefaultLocale_cached ( ) { java . time . format . DecimalStyle loc1 = java . time . format . DecimalStyle . ofDefaultLocale ( ) ; java . time . format . DecimalStyle loc2 = java . time . format . DecimalStyle . ofDefaultLocale ( ) ; "<AssertPlaceHolder>" ; } ofDefaultLocale ( ) { return java . time . format . De... | org . junit . Assert . assertSame ( loc1 , loc2 ) |
testUnsignedByte ( ) { final byte TEST_CASE = ( ( byte ) ( 253 ) ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 1 ) ; buffer = buffer . order ( ByteOrder . BIG_ENDIAN ) ; buffer . put ( TEST_CASE ) ; short readUbyte = com . nhnent . haste . common . ByteRead . getUnsignedByte ( buffer . array... | org . junit . Assert . assertEquals ( ( ( short ) ( TEST_CASE & 255 ) ) , readUbyte ) |
interceptorsOrdered ( ) { final org . mule . runtime . core . internal . processor . interceptor . a . ProcessorInterceptorFactoryA intFactoryA = new org . mule . runtime . core . internal . processor . interceptor . a . ProcessorInterceptorFactoryA ( ) ; final org . mule . runtime . core . internal . processor . inter... | org . junit . Assert . assertThat ( manager . getInterceptorFactories ( ) , org . hamcrest . Matchers . contains ( intFactoryC , intFactoryB , intFactoryA ) ) |
testShouldExecuteSuccess ( ) { org . sonar . api . batch . AnalysisMode analysisMode = mock ( org . sonar . api . batch . AnalysisMode . class ) ; when ( analysisMode . isPublish ( ) ) . thenReturn ( false ) ; org . sonar . api . issue . ProjectIssues projectIssues = mock ( org . sonar . api . issue . ProjectIssues . c... | org . junit . Assert . assertEquals ( true , new org . sonar . plugins . buildbreaker . IssuesSeverityBreaker ( analysisMode , projectIssues , settings ) . shouldExecuteOnProject ( null ) ) |
deserializersTestsVertex ( ) { final org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerGraph tg = org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerGraph . open ( ) ; final org . apache . tinkerpop . gremlin . structure . Vertex v = tg . addVertex ( "vertexTest" ) ; v . property ( ... | org . junit . Assert . assertEquals ( v , vRead ) |
extract ( ) { oasis . names . tc . ebxml_regrep . xsd . rim . _3 . ExtrinsicObjectType extrinsicObject = createExtrinsicObject ( "formatCode" , "codingScheme" , "value" ) ; javax . xml . bind . JAXBElement < oasis . names . tc . ebxml_regrep . xsd . rim . _3 . ExtrinsicObjectType > jaxbWrapper = wrapExtrinsicObject ( e... | org . junit . Assert . assertEquals ( "value" , payloadType . get ( ) ) |
testXPath ( ) { java . lang . Exception exception = null ; try { driver . findElements ( org . openqa . selenium . By . xpath ( xpath ) ) ; } catch ( org . openqa . selenium . WebDriverException e ) { exception = e ; } "<AssertPlaceHolder>" ; } findElements ( org . openqa . selenium . By ) { return by . findElements ( ... | org . junit . Assert . assertNull ( exception ) |
testDetailOutput ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "-?" } ; org . apache . cxf . tools . corba . WSDLToIDL . main ( args ) ; "<AssertPlaceHolder>" ; } getStdOut ( ) { return new java . lang . String ( stdOut . toByteArray ( ) ) ; } | org . junit . Assert . assertNotNull ( getStdOut ( ) ) |
testReadCertificate ( ) { java . util . Map < java . lang . String , java . lang . Object > securityConfig = com . networknt . config . Config . getInstance ( ) . getJsonMapConfig ( JwtHelper . SECURITY_CONFIG ) ; java . util . Map < java . lang . String , java . lang . Object > jwtConfig = ( ( java . util . Map < java... | org . junit . Assert . assertEquals ( 2 , certMap . size ( ) ) |
testStripContextPath_withoutContextPath ( ) { java . lang . String serviceHandlerUrl = "entry?servicehandler=handler" ; "<AssertPlaceHolder>" ; } stripContextPath ( java . lang . String ) { java . util . regex . Matcher matcher = com . eclipsesource . tabris . internal . CameraImpl . SERVICE_URL_PATTERN . matcher ( ser... | org . junit . Assert . assertEquals ( "entry?servicehandler=handler" , com . eclipsesource . tabris . internal . CameraImpl . stripContextPath ( serviceHandlerUrl ) ) |
testLoadInit ( ) { final java . lang . String resource = "monitor.ini" ; final com . taobao . metamorphosis . tools . monitor . core . MonitorConfig monitorConfig = new com . taobao . metamorphosis . tools . monitor . core . MonitorConfig ( ) ; monitorConfig . loadInis ( resource ) ; "<AssertPlaceHolder>" ; } getWangwa... | org . junit . Assert . assertTrue ( monitorConfig . getWangwangList ( ) . contains ( "" ) ) |
testIfUploadedFileIsConverted ( ) { when ( request . getAttribute ( "myfile" ) ) . thenReturn ( file ) ; br . com . caelum . vraptor . observer . upload . UploadedFileConverter converter = new br . com . caelum . vraptor . observer . upload . UploadedFileConverter ( request ) ; br . com . caelum . vraptor . observer . ... | org . junit . Assert . assertEquals ( file , uploadedFile ) |
wolfTest ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatusExtended bs = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatusExtended ( 3 ) ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . ga... | org . junit . Assert . assertEquals ( bs . getWolf ( ) , wolf ) |
testTree ( ) { org . deeplearning4j . clustering . kdtree . KDTree tree = new org . deeplearning4j . clustering . kdtree . KDTree ( 2 ) ; org . nd4j . linalg . api . ndarray . INDArray half = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.5 , 0.5 } , new long [ ] { 1 , 2 } ) . castTo ( DataType . FL... | org . junit . Assert . assertEquals ( half , pair . getValue ( ) ) |
shouldInjectField ( ) { com . couchbase . client . java . search . queries . GeoDistanceQuery query = new com . couchbase . client . java . search . queries . GeoDistanceQuery ( 1.0 , 2.0 , "5m" ) ; query . field ( "fname" ) ; com . couchbase . client . java . document . json . JsonObject result = com . couchbase . cli... | org . junit . Assert . assertEquals ( expected , result ) |
whenPopThenSizeIsOne ( ) { list . pop ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . elements . size ( ) ; } | org . junit . Assert . assertThat ( list . size ( ) , org . hamcrest . core . Is . is ( 1 ) ) |
testClone ( ) { org . roaringbitmap . buffer . MappeableBitmapContainer mappeableBitmapContainer = new org . roaringbitmap . buffer . MappeableBitmapContainer ( ) ; for ( int k = 0 ; k < ( 2 * ( org . roaringbitmap . buffer . MappeableArrayContainer . DEFAULT_MAX_SIZE ) ) ; ++ k ) { mappeableBitmapContainer . add ( ( (... | org . junit . Assert . assertEquals ( tmbcList , tmbcCloneList ) |
shouldNotEvaluateIncludesWithoutClassPattern ( ) { 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 ) ; jav... | org . junit . Assert . assertThat ( predicate . test ( com . oracle . bedrock . testsupport . junit . options . Integer . class ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testSerializeDeserializeLeafList ( ) { final org . opendaylight . restconf . common . util . IdentityValuesDTO valuesDTO = this . instanceIdentifierDTO . serialize ( this . instanceIdentifierOKLeafList ) ; final org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier deserializedIdentifier = this . ... | org . junit . Assert . assertEquals ( this . instanceIdentifierOKLeafList , deserializedIdentifier ) |
givenNotExactPhrase_whenUseSlop_thenQueryMatches ( ) { final org . springframework . data . elasticsearch . core . query . SearchQuery searchQuery = new org . springframework . data . elasticsearch . core . query . NativeSearchQueryBuilder ( ) . withQuery ( matchPhraseQuery ( "title" , "spring<sp>elasticsearch" ) . slo... | org . junit . Assert . assertEquals ( 1 , articles . size ( ) ) |
testEchoBytes ( ) { org . apache . avro . Random random = new org . apache . avro . Random ( ) ; int length = random . nextInt ( ( 1024 * 16 ) ) ; java . nio . ByteBuffer data = java . nio . ByteBuffer . allocate ( length ) ; random . nextBytes ( data . array ( ) ) ; data . flip ( ) ; java . nio . ByteBuffer echoed = o... | org . junit . Assert . assertEquals ( data , echoed ) |
each_by_long_range ( ) { int maxId = dao . getMaxId ( org . nutz . dao . test . meta . Pet . class ) ; final java . util . List < org . nutz . dao . test . meta . Pet > pets = new java . util . ArrayList < org . nutz . dao . test . meta . Pet > ( ) ; dao . each ( org . nutz . dao . test . meta . Pet . class , org . nut... | org . junit . Assert . assertEquals ( 2 , pets . size ( ) ) |
geenBerekendeTakenAlsSoortSelectieNietGevuld ( ) { dienst . setSoortSelectie ( null ) ; java . util . Collection < nl . bzk . brp . beheer . service . selectie . SelectieTaakDTO > taken = selectieTaakBerekenService . berekenSelectieTaken ( java . time . LocalDate . now ( ) . minus ( 1 , ChronoUnit . DAYS ) , java . tim... | org . junit . Assert . assertThat ( taken . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testAcceptFailed ( ) { when ( context . getParent ( ) ) . thenReturn ( element ) ; when ( context . getCandidate ( ) ) . thenReturn ( candidate ) ; final boolean accepts = tested . accepts ( org . kie . workbench . common . stunner . core . rule . handler . impl . NodeDockingEvaluationHandlerTest . RULE , context ) ; "... | org . junit . Assert . assertFalse ( accepts ) |
mkdirsWithPermission ( ) { java . util . List < java . lang . Integer > permissionValues = com . google . common . collect . Lists . newArrayList ( 73 , 146 , 219 , 292 , 365 , 438 , 511 , 493 , 475 , 420 , 347 , 329 ) ; for ( int value : permissionValues ) { org . apache . hadoop . fs . Path dir = new org . apache . h... | org . junit . Assert . assertEquals ( permission , fs . getPermission ( ) ) |
testAddConfigurationParameterWithChainFilter ( ) { org . walkmod . commands . AddTransformationCommand command = new org . walkmod . commands . AddTransformationCommand ( "imports-cleaner" , "mychain" , false , null , null , null , null , false ) ; java . io . File aux = new java . io . File ( "src/test/resources/xmlpa... | org . junit . Assert . assertTrue ( ( ( output . contains ( "testParam" ) ) && ( output . contains ( "hello" ) ) ) ) |
getWritingDb ( ) { java . lang . Iterable < java . lang . String > results ; org . apache . giraph . conf . GiraphConfiguration conf = new org . apache . giraph . conf . GiraphConfiguration ( ) ; org . apache . giraph . io . gora . GIRAPH_GORA_DATASTORE_CLASS . set ( conf , "org.apache.gora.memory.store.MemStore" ) ; o... | org . junit . Assert . assertNotNull ( results ) |
testRootNameIsNull ( ) { java . io . OutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . apache . nifi . serialization . record . RecordSet recordSet = org . apache . nifi . xml . TestWriteXMLResultUtils . getSimpleRecords ( ) ; org . apache . nifi . xml . WriteXMLResult writer = new org . apache . nif... | org . junit . Assert . assertEquals ( expectedMessage , actualMessage . toString ( ) ) |
testEquals ( ) { org . bson . types . ObjectId id = new org . bson . types . ObjectId ( ) ; org . mintcode . errabbit . model . RabbitGroup group1 = new org . mintcode . errabbit . model . RabbitGroup ( ) ; group1 . setId ( id ) ; org . mintcode . errabbit . model . RabbitGroup group2 = new org . mintcode . errabbit . ... | org . junit . Assert . assertEquals ( group1 , group2 ) |
testBooleanValue ( ) { initializer . configure ( "eternal=true" ) . initialize ( config ) ; "<AssertPlaceHolder>" ; } isEternal ( ) { return cache . getCacheConfiguration ( ) . isEternal ( ) ; } | org . junit . Assert . assertEquals ( true , config . isEternal ( ) ) |
countWith ( ) { com . gs . collections . api . map . MapIterable < java . lang . String , java . lang . String > map = this . newMapWithKeysValues ( "1" , "One" , "2" , "Two" , "3" , "Three" ) ; int actual = map . countWith ( Object :: equals , "One" ) ; "<AssertPlaceHolder>" ; } countWith ( com . gs . collections . ap... | org . junit . Assert . assertEquals ( 1 , actual ) |
testSetSymbol_String ( ) { org . openscience . cdk . interfaces . IElement e = ( ( org . openscience . cdk . interfaces . IElement ) ( newChemObject ( ) ) ) ; e . setSymbol ( "C" ) ; "<AssertPlaceHolder>" ; } getSymbol ( ) { return symbol ; } | org . junit . Assert . assertEquals ( "C" , e . getSymbol ( ) ) |
testDefaultAuthors ( ) { com . epimorphics . lda . renderers . feed . tests . FeedRenderer fr = makeFeedRenderer ( config ) ; "<AssertPlaceHolder>" ; } getAuthors ( ) { return getNodeList ( config , ELDA_API . feedAuthors ) ; } | org . junit . Assert . assertTrue ( fr . getAuthors ( ) . isEmpty ( ) ) |
testGetEdgesByLabel ( ) { java . util . List < org . s1ck . gdl . model . Edge > aEdges = com . google . common . collect . Lists . newArrayList ( org . gradoop . flink . model . impl . operators . matching . common . query . QueryHandlerTest . QUERY_HANDLER . getEdgesByLabel ( "a" ) ) ; java . util . List < org . s1ck... | org . junit . Assert . assertTrue ( org . gradoop . flink . model . impl . operators . matching . common . query . QueryHandlerTest . elementsEqual ( aEdges , expected ) ) |
aTaskWithoutAllocationsHasZeroAssignedHours ( ) { "<AssertPlaceHolder>" ; } getAssignedHours ( ) { return org . libreplan . business . planner . entities . AggregateOfResourceAllocations . createFromSatisfied ( resourceAllocations ) . getTotalHours ( ) ; } | org . junit . Assert . assertThat ( task . getAssignedHours ( ) , org . hamcrest . CoreMatchers . equalTo ( 0 ) ) |
testRestoreWithFilterReturnsFalse ( ) { final java . nio . file . PathMatcher filter = org . mockito . Mockito . mock ( java . nio . file . PathMatcher . class ) ; org . mockito . Mockito . when ( entry . restore ( org . mockito . Mockito . eq ( true ) , org . mockito . Mockito . same ( filter ) ) ) . thenReturn ( fals... | org . junit . Assert . assertThat ( entry . restore ( filter ) , org . hamcrest . Matchers . equalTo ( false ) ) |
when_setWindowDefinition_then_windowDefinitionReturnsIt ( ) { com . hazelcast . jet . pipeline . SlidingWindowDefinition tumbling = com . hazelcast . jet . pipeline . WindowDefinition . tumbling ( 2 ) ; com . hazelcast . jet . pipeline . StageWithWindow < java . lang . Integer > stage = streamStageFromList ( emptyList ... | org . junit . Assert . assertEquals ( tumbling , stage . windowDefinition ( ) ) |
testGetExpectedPartitionValues ( ) { org . finra . herd . model . api . xml . PartitionKeyGroupKey partitionKeyGroupKey = new org . finra . herd . model . api . xml . PartitionKeyGroupKey ( ) ; partitionKeyGroupKey . setPartitionKeyGroupName ( org . finra . herd . rest . PARTITION_KEY_GROUP ) ; java . util . List < jav... | org . junit . Assert . assertEquals ( expectedPartitionValuesInformation , resultPartitionValuesInformation ) |
postProcessorRegistered ( ) { org . alfresco . service . cmr . repository . NodeRef nodeRef = generateCmContent ( "anyname" ) ; java . lang . String perm = org . alfresco . module . org_alfresco_module_rm . test . util . AlfMock . generateText ( ) ; when ( mockedPermissionProcessorRegistry . getPermissionPostProcessors... | org . junit . Assert . assertEquals ( AccessStatus . ALLOWED , result ) |
testErrorProcessRow ( ) { org . mockito . Mockito . when ( mockHelper . logChannelInterfaceFactory . create ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( org . pentaho . di . core . logging . LoggingObjectInterface . class ) ) ) . thenReturn ( mockHelper . logChannelInterface ) ; org . mockito .... | org . junit . Assert . assertFalse ( result ) |
writeAndReadTest ( ) { java . io . File file = new java . io . File ( "src/main/resources/testfiles/testresults" ) ; file . mkdirs ( ) ; xml . XMLhandler gm = new xml . XMLhandler ( ) ; model . Column column1 = new model . Column ( "col1" , model . ColumnType . INT ) ; model . Column column2 = new model . Column ( "col... | org . junit . Assert . assertEquals ( 2 , readed . size ( ) ) |
testMaterializeOfEmptyIntermediatePCollection_MRPipeline ( ) { org . apache . crunch . PCollection < java . lang . String > emptyIntermediate = createPesistentEmptyIntermediate ( new org . apache . crunch . impl . mr . MRPipeline ( this . getClass ( ) , tmpDir . getDefaultConfiguration ( ) ) ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertThat ( newArrayList ( emptyIntermediate . materialize ( ) ) . size ( ) , org . hamcrest . Matchers . is ( 0 ) ) |
getTrustedTerritories_defaultTesting_shouldBeNull ( ) { "<AssertPlaceHolder>" ; } getTrustedTerritories ( ) { return trustedTerritories ; } | org . junit . Assert . assertEquals ( new java . util . ArrayList ( ) , this . configuration . getTrustedTerritories ( ) ) |
testCustomFrameBuilderExplicit ( ) { final com . syncleus . ferma . Person o = new com . syncleus . ferma . Person ( ) ; final com . tinkerpop . blueprints . Graph g = new com . tinkerpop . blueprints . impls . tg . TinkerGraph ( ) ; final com . syncleus . ferma . FramedGraph fg = new com . syncleus . ferma . Delegatin... | org . junit . Assert . assertEquals ( o , person ) |
testCanReadPDFWithOwnerEncryption ( ) { org . apache . pdfbox . pdmodel . PDDocument pdf_document = org . apache . pdfbox . pdmodel . PDDocument . load ( new java . io . File ( "src/test/resources/technology/tabula/S2MNCEbirdisland.pdf" ) ) ; technology . tabula . ObjectExtractor oe = new technology . tabula . ObjectEx... | org . junit . Assert . assertEquals ( 2 , i ) |
rootPathGetFileName ( ) { com . beijunyi . parallelgit . filesystem . GitPath path = gfs . getPath ( "/" ) ; com . beijunyi . parallelgit . filesystem . GitPath result = path . getFileName ( ) ; "<AssertPlaceHolder>" ; } getFileName ( ) { initOffsets ( ) ; int count = offsets . length ; if ( count == 0 ) return null ; ... | org . junit . Assert . assertNull ( result ) |
testDetectStreamReadProblems ( ) { byte [ ] data = "abcdefghijklmnopqrstuvwxyz0123456789" . getBytes ( org . apache . tika . detect . US_ASCII ) ; org . apache . tika . mime . MediaType testMT = new org . apache . tika . mime . MediaType ( "application" , "test" ) ; org . apache . tika . detect . Detector detector = ne... | org . junit . Assert . assertEquals ( testMT , detector . detect ( stream , new org . apache . tika . metadata . Metadata ( ) ) ) |
form_setsUsagePointModel ( ) { org . springframework . ui . ModelMap model = new org . springframework . ui . ModelMap ( ) ; controller . form ( 1L , model ) ; "<AssertPlaceHolder>" ; } form ( java . lang . Long , org . springframework . ui . ModelMap ) { model . put ( "usagePointForm" , new org . greenbuttonalliance .... | org . junit . Assert . assertEquals ( AssociateUsagePointController . UsagePointForm . class , model . get ( "usagePointForm" ) . getClass ( ) ) |
addTopology ( ) { uk . ac . ebi . beam . Topology t = mock ( uk . ac . ebi . beam . Topology . class ) ; when ( t . atom ( ) ) . thenReturn ( 5 ) ; uk . ac . ebi . beam . Graph g = new uk . ac . ebi . beam . Graph ( 6 ) ; g . addTopology ( t ) ; "<AssertPlaceHolder>" ; } topologyOf ( int ) { if ( ( topologies [ u ] ) =... | org . junit . Assert . assertThat ( g . topologyOf ( 5 ) , org . hamcrest . CoreMatchers . is ( t ) ) |
testOverwriteExistingFile ( ) { java . lang . String name = "test.txt" ; java . lang . String mimeType = "text/plain" ; org . nuxeo . ecm . core . api . PathRef pathRef = new org . nuxeo . ecm . core . api . PathRef ( ( "/workspaces/workspace/" + name ) ) ; "<AssertPlaceHolder>" ; byte [ ] bytes = new byte [ ] { 1 , 2 ... | org . junit . Assert . assertTrue ( session . exists ( pathRef ) ) |
threadThatBlocksNewTxsCantStartNewTxs ( ) { org . neo4j . kernel . impl . api . KernelTransactions kernelTransactions = org . neo4j . kernel . impl . api . KernelTransactionsTest . newKernelTransactions ( ) ; kernelTransactions . blockNewTransactions ( ) ; try { kernelTransactions . newInstance ( KernelTransaction . Ty... | org . junit . Assert . assertThat ( e , org . hamcrest . CoreMatchers . instanceOf ( org . neo4j . kernel . impl . api . IllegalStateException . class ) ) |
testCSVEndToEndWithJobThatConsistsOfTwoMappingWhereOneMappingIsASimpleMapping ( ) { final java . lang . String expected = org . dswarm . persistence . util . DMPPersistenceUtil . getResourceAsString ( "test_transf_sorted.result.json" ) ; final org . dswarm . converter . flow . JSONTransformationFlowFactory flowFactory ... | org . junit . Assert . assertEquals ( finalExpected , finalActual ) |
testEncodeMySQLxffff ( ) { System . out . println ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeMySQL]" ) ) + "<sp>is<sp>encoded<sp>(escaped)<sp>as<sp>\"0xffff\"<sp>is<sp>encoded<sp>(escaped)<sp>as<sp>\"xxffff\"" ) ) ; java . lang . String in = "xffff" ; j... | org . junit . Assert . assertEquals ( expected , out ) |
findClass ( ) { final com . intellij . psi . PsiClass psiBaseClass = mock ( com . intellij . psi . PsiClass . class ) ; when ( javaFileManager . findClass ( de . plushnikov . intellij . plugin . extension . LombokElementFinderTest . BASE_CLASS , scope ) ) . thenReturn ( psiBaseClass ) ; final com . intellij . psi . Psi... | org . junit . Assert . assertNotNull ( psiClass ) |
geenDatumIngang ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst dienst = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienst ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienstbundel ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . Leveringsautorisatie... | org . junit . Assert . assertEquals ( 1 , errorCount ( dienst ) ) |
forPatient_shouldCreateRegimenHistoryForPatient ( ) { org . openmrs . Patient patient6 = org . openmrs . api . context . Context . getPatientService ( ) . getPatient ( 6 ) ; org . openmrs . Concept arvs = org . openmrs . module . kenyaemr . Dictionary . getConcept ( Dictionary . ANTIRETROVIRAL_DRUGS ) ; org . openmrs .... | org . junit . Assert . assertEquals ( 4 , regimenHistory . getChanges ( ) . size ( ) ) |
testEmptyResponse ( ) { stubFor ( any ( urlMatching ( "/" ) ) . willReturn ( aResponse ( ) . withStatus ( HttpURLConnection . HTTP_OK ) . withHeader ( "Content-Type" , "application/json" ) . withBody ( com . suse . salt . netapi . calls . modules . SmbiosTest . JSON_EMPTY_RESPONSE ) ) ) ; java . util . Map < java . lan... | org . junit . Assert . assertEquals ( 0 , response . size ( ) ) |
shouldCallExternalServiceMock ( ) { info . novatec . beantest . demo . ejb . MyExternalService externalService = info . novatec . beantest . demo . mocks . ExternalServicesMockProducer . getExternalService ( ) ; org . mockito . Mockito . when ( externalService . doSomething ( ) ) . thenReturn ( "Hello<sp>World" ) ; inf... | org . junit . Assert . assertThat ( service . callExternalService ( ) , org . hamcrest . CoreMatchers . is ( "Hello<sp>World" ) ) |
testReadPrivateKeyFromByteArray_shouldBeSamePrivateKey ( ) { byte [ ] data = generatedPrivatekey . getEncoded ( ) ; java . security . PrivateKey parsedKey = org . openengsb . core . util . CipherUtils . deserializePrivateKey ( data , "RSA" ) ; "<AssertPlaceHolder>" ; } deserializePrivateKey ( byte [ ] , java . lang . S... | org . junit . Assert . assertEquals ( generatedPrivatekey , parsedKey ) |
shouldEchoServerSendTextFrameWithEmptyPayloadFragmented ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; final java . util . List < java . nio . ByteBuffer > bufferList = new java . util . ArrayList ( ) ; context . check... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
test06 ( ) { org . evosuite . runtime . util . ByteDataInputStream byteDataInputStream0 = new org . evosuite . runtime . util . ByteDataInputStream ( "1" ) ; boolean boolean0 = byteDataInputStream0 . markSupported ( ) ; "<AssertPlaceHolder>" ; } markSupported ( ) { return false ; } | org . junit . Assert . assertFalse ( boolean0 ) |
testMath226 ( ) { double [ ] mean = new double [ ] { 1 , 1 , 10 , 1 } ; double [ ] [ ] cov = new double [ ] [ ] { new double [ ] { 1 , 3 , 2 , 6 } , new double [ ] { 3 , 13 , 16 , 2 } , new double [ ] { 2 , 16 , 38 , - 1 } , new double [ ] { 6 , 2 , - 1 , 197 } } ; org . hipparchus . linear . RealMatrix covRM = org . h... | org . junit . Assert . assertTrue ( ( ( ( max [ j ] ) - ( min [ j ] ) ) > 2.0 ) ) |
shouldAllowToAlterCaseOfResourceName ( ) { java . lang . String resourceName = "amw" ; java . lang . String newResourceName = "AMW" ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resourceA = new ch . puzzle . itc . mobiliar . builders . ResourceEntityBuilder ( ) . withName ( resourc... | org . junit . Assert . assertNotNull ( entityManager . find ( ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity . class , resourceA . getId ( ) ) ) |
testStreamSearchNameContainsSubstring ( ) { mockMvc . perform ( post ( "f" 5 ) . param ( "name" , "foo" ) . param ( "definition" , "f" 2 ) . accept ( MediaType . APPLICATION_JSON ) ) . andDo ( print ( ) ) . andExpect ( status ( ) . isCreated ( ) ) ; mockMvc . perform ( post ( "f" 5 ) . param ( "name" , "foaz" ) . param... | org . junit . Assert . assertEquals ( 3 , repository . count ( ) ) |
testCompressionOutInterceptor ( ) { org . talend . esb . policy . compression . impl . CompressionOutInterceptor coi = new org . talend . esb . policy . compression . impl . CompressionOutInterceptor ( 1000 ) ; "<AssertPlaceHolder>" ; } getThreshold ( ) { return threshold ; } | org . junit . Assert . assertEquals ( coi . getThreshold ( ) , 1000 ) |
characterCR ( ) { org . apache . pdfbox . pdmodel . interactive . form . PDField field = acroForm . getField ( "pdfbox-cr" ) ; field . setValue ( "CR\rCR" ) ; java . util . List < java . lang . String > pdfboxValues = getStringsFromStream ( field ) ; java . util . List < java . lang . String > acrobatValues = getString... | org . junit . Assert . assertEquals ( pdfboxValues , acrobatValues ) |
testArraysMerge3 ( ) { java . lang . String [ ] a1 = new java . lang . String [ ] { } ; java . lang . String [ ] a2 = new java . lang . String [ ] { } ; java . lang . String [ ] result = org . nuxeo . common . utils . ArrayUtils . arrayMerge ( a1 , a2 ) ; java . lang . String [ ] expected = new java . lang . String [ ]... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expected , result ) ) |
customNoPrefixStrategyUsed ( ) { javax . validation . Validator validator = javax . validation . Validation . byProvider ( org . hibernate . validator . HibernateValidator . class ) . configure ( ) . getterPropertySelectionStrategy ( new org . hibernate . validator . referenceguide . chapter12 . getterselectionstrategy... | org . junit . Assert . assertEquals ( 3 , constraintViolations . size ( ) ) |
shouldAddTermsFromRedisOnHgetCommand ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "hget" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "simpleKey" ) ; when ( localParamsMock . get ( "field" ) ) . thenReturn ( "f1" ) ; when ( localParamsMock . get ( QueryParsing . V ) ) . thenReturn ( ... | org . junit . Assert . assertEquals ( 1 , terms . size ( ) ) |
escape_cr_escape_lf ( ) { java . util . List < java . lang . String > results = com . asakusafw . runtime . io . text . tabular . LineCursorTest . parse ( '\\' , false , "Hello\\\r\\\nworld" ) ; "<AssertPlaceHolder>" ; } contains ( E [ ] ) { return org . hamcrest . Matchers . Matchers . contains ( items ) ; } | org . junit . Assert . assertThat ( results , contains ( "Hello\\\r\\\nworld" ) ) |
testYamlMultiValueWithPlainFlowStyleFormatSingleValue ( ) { org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor . YamlMultiValuePropertyDecorator yamlMultiValuePropertyDecorator = new org . apache . ambari . server . controller . internal . BlueprintConfigurationProcessor . YamlMult... | org . junit . Assert . assertEquals ( expectedValue , newValue ) |
testNonEpsg4326Srs ( ) { java . util . List < java . lang . String > gmlProps = new java . util . ArrayList ( ) ; gmlProps . add ( org . codice . ddf . spatial . ogc . wfs . v2_0_0 . catalog . source . WfsFilterDelegateTest . MOCK_GEOM ) ; when ( mockFeatureMetacardType . getGmlProperties ( ) ) . thenReturn ( gmlProps ... | org . junit . Assert . assertTrue ( ( filter == null ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.