input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testTopContainerLastChildOverride ( ) { final org . opendaylight . yangtools . yang . data . api . schema . ContainerNode expectedStructure = org . opendaylight . yangtools . yang . data . impl . schema . Builders . containerBuilder ( ) . withNodeIdentifier ( rootContainer ) . withChild ( org . opendaylight . yangtools... | org . junit . Assert . assertEquals ( expectedStructure , filter ) |
testContainsRunContainer_ExcludeSuperSet ( ) { org . roaringbitmap . Container ac = new org . roaringbitmap . ArrayContainer ( ) . add ( 0 , 10 ) ; org . roaringbitmap . Container superset = new org . roaringbitmap . RunContainer ( ) . add ( 0 , 20 ) ; "<AssertPlaceHolder>" ; } contains ( int ) { throw new java . lang ... | org . junit . Assert . assertFalse ( ac . contains ( superset ) ) |
testSplitCapabilitiesStringEmpty ( ) { java . util . List < org . eurekastreams . server . domain . BackgroundItem > list = org . eurekastreams . server . domain . DomainFormatUtility . splitCapabilitiesString ( "" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { throw new java . lang . UnsupportedOperationException ( org .... | org . junit . Assert . assertTrue ( list . isEmpty ( ) ) |
combineSizeShouldDefaultToTen ( ) { java . util . Map < org . apache . blur . command . Shard , java . util . List < java . lang . String > > execResults = com . google . common . collect . Maps . newHashMap ( ) ; execResults . put ( new org . apache . blur . command . Shard ( "t1" , "s1" ) , com . google . common . co... | org . junit . Assert . assertEquals ( expected , returned ) |
testFramesWithSameNameAreNotCombined ( ) { final java . util . Collection < edu . cmu . cs . lti . ark . fn . parsing . RankedScoredRoleAssignment > roleAssignments = edu . cmu . cs . lti . ark . fn . evaluation . PrepareFullAnnotationJson . parseRoleAssignments ( java . util . Arrays . asList ( edu . cmu . cs . lti . ... | org . junit . Assert . assertEquals ( 2 , calendricUnitFrames . size ( ) ) |
testSaveCountryVats_delete ( ) { createDefaultVat ( BigDecimal . ZERO ) ; createCountryVat ( org . oscm . vatservice . bean . VatServiceBeanIT . TEN ) ; java . util . List < org . oscm . internal . vo . VOCountryVatRate > countryVatRates = vatService . getCountryVats ( ) ; countryVatRates . get ( 0 ) . setRate ( null )... | org . junit . Assert . assertEquals ( 0 , vatService . getCountryVats ( ) . size ( ) ) |
evaluateWithObjectNotFoundWithDefaultLanguage ( ) { org . xwiki . bridge . DocumentAccessBridge documentBridge = this . mocker . getInstance ( org . xwiki . bridge . DocumentAccessBridge . class ) ; org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentRef... | org . junit . Assert . assertEquals ( result , "Salut<sp><b>John<sp>Doe</b><sp><br<sp>/>john@doe.com" ) |
testLeidAfZonderExtraBijgehoudenPersonen ( ) { when ( partner . getID ( ) ) . thenReturn ( 1 ) ; model . leidAf ( ) ; "<AssertPlaceHolder>" ; } getExtraBijgehoudenPersonen ( ) { return this . extraBijgehoudenPersonen ; } | org . junit . Assert . assertThat ( model . getExtraBijgehoudenPersonen ( ) . size ( ) , org . hamcrest . core . Is . is ( 0 ) ) |
portSetToSomethingElseIsRespected ( ) { settings . setPort ( 1234 ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return ( ( java . lang . Integer ) ( options . get ( com . opera . core . systems . OperaSettings . Capability . PORT ) . getValue ( ) ) ) ; } | org . junit . Assert . assertThat ( settings . getPort ( ) , org . hamcrest . CoreMatchers . is ( 1234 ) ) |
registerDefaultDoesNotOverridePreviouslyRegisteredStrategy ( ) { com . avanza . astrix . modules . ModulesConfigurer modulesConfigurer = new com . avanza . astrix . modules . ModulesConfigurer ( ) ; modulesConfigurer . register ( new com . avanza . astrix . modules . Module ( ) { @ com . avanza . astrix . modules . tes... | org . junit . Assert . assertEquals ( "foo" , ping . ping ( "foo" ) ) |
testAppendToNonExistingHeader ( ) { message . appendHeader ( "foo" , "<sp>baz2" ) ; "<AssertPlaceHolder>" ; } getFirstHeaderValue ( java . lang . String ) { java . util . List < java . lang . String > values = headers . get ( name ) ; if ( values == null ) { return null ; } else { java . util . Iterator < java . lang .... | org . junit . Assert . assertEquals ( "<sp>baz2" , message . getFirstHeaderValue ( "foo" ) ) |
testSerializeDeserialize ( ) { org . apache . hadoop . nfs . NfsTime t1 = new org . apache . hadoop . nfs . NfsTime ( 1001 ) ; org . apache . hadoop . oncrpc . XDR xdr = new org . apache . hadoop . oncrpc . XDR ( ) ; t1 . serialize ( xdr ) ; org . apache . hadoop . nfs . NfsTime t2 = org . apache . hadoop . nfs . NfsTi... | org . junit . Assert . assertEquals ( t1 , t2 ) |
convertFromTimeWithZoneId ( ) { java . util . Date date = io . atlasmap . converters . DateTimeHelper . convertSqlTimeToDate ( java . sql . Time . valueOf ( java . time . LocalTime . now ( ) ) , "America/New_York" ) ; "<AssertPlaceHolder>" ; } convertSqlTimeToDate ( java . sql . Time , java . lang . String ) { return i... | org . junit . Assert . assertNotNull ( date ) |
roleExistEntryIsFoundExpectTrue ( ) { net . jforum . entities . Role role = new net . jforum . entities . Role ( ) ; role . setName ( "role1" ) ; net . jforum . entities . Group g = new net . jforum . entities . Group ( ) ; g . addRole ( role ) ; "<AssertPlaceHolder>" ; } roleExist ( java . lang . String ) { for ( net ... | org . junit . Assert . assertTrue ( g . roleExist ( "role1" ) ) |
test01_fromSpec ( ) { java . util . List < com . liferay . faces . util . config . internal . FacesConfigDescriptor > facesConfigDescriptors = new java . util . ArrayList < com . liferay . faces . util . config . internal . FacesConfigDescriptor > ( ) ; com . liferay . faces . util . xml . OrderingTest . parseConfigura... | org . junit . Assert . assertTrue ( message , expected . equals ( actually ) ) |
MathML2Short_NormCons ( ) { java . lang . String xmlForm = "<math><mrow><mi>a</mi><mo>+</mo><sp><msup><sp><mi>b</mi><mn>2</mn></msup></mrow></math>" ; java . lang . String expect = "math(mrow(mi(a)mo(+)msup(mi(b)mn(con))))" ; gov . uspto . patent . mathml . MathML mathML = gov . uspto . patent . mathml . MathML . read ... | org . junit . Assert . assertEquals ( expect , stringForm ) |
testMeanAlongDim1BP ( ) { for ( boolean keepDims : new boolean [ ] { false , true } ) { org . nd4j . linalg . api . ndarray . INDArray preReduceInput = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 12 , 12 ) . reshape ( 3 , 4 ) ; long [ ] reducedShape_1 = ( keepDims ) ? new long [ ] { 3 , 1 } : new long [ ] { 3... | org . junit . Assert . assertNull ( err ) |
testMapJuisteStapelType ( ) { final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Stapel > stapels = new java . util . LinkedHashSet ( ) ; final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Stapel stapel = new nl . bzk . migratiebrp ... | org . junit . Assert . assertNotNull ( mapper . map ( stapels ) ) |
testError ( ) { hu . elte . txtuml . api . model . execution . seqdiag . sequences . SequenceStateAssertErr diag = new hu . elte . txtuml . api . model . execution . seqdiag . sequences . SequenceStateAssertErr ( ) ; hu . elte . txtuml . api . model . execution . SequenceDiagramExecutor executor = hu . elte . txtuml . ... | org . junit . Assert . assertEquals ( 3 , executor . getErrors ( ) . size ( ) ) |
shouldNotRemoveMoreCountersThanAvailable ( ) { counter . remove ( 10 ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return count ; } | org . junit . Assert . assertEquals ( 0 , counter . getCount ( ) ) |
convertsSmallOrdinalValues ( ) { com . sjl . dsl4xml . support . convert . DoubleStringConverter _c = new com . sjl . dsl4xml . support . convert . DoubleStringConverter ( ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { return ( aValue == null ) || ( "" . equals ( aValue ) ) ? 0 : new java . lang . Lon... | org . junit . Assert . assertEquals ( new java . lang . Double ( 1 ) , _c . convert ( "1" ) ) |
testBatchInitAndLearn ( ) { org . hawkular . datamining . forecast . ModelData rModel = org . hawkular . datamining . forecast . ModelReader . read ( "wnLowVariance" ) ; org . hawkular . datamining . forecast . models . DoubleExponentialSmoothing . DoubleExOptimizer optimizer = org . hawkular . datamining . forecast . ... | org . junit . Assert . assertEquals ( batchInitStatistics , batchLearnStatistics ) |
testOptionalResourceInjectionWithNoDependencies ( ) { org . springframework . ide . eclipse . beans . core . internal . model . BeansConfig config = new org . springframework . ide . eclipse . beans . core . internal . model . BeansConfig ( beansProject , "src/org/springframework/beans/factory/annotation/testOptionalRe... | org . junit . Assert . assertEquals ( 0 , references . size ( ) ) |
addTwoListeners_jsIsExecutedOnce ( ) { page . addBrowserWindowResizeListener ( listener ) ; page . addBrowserWindowResizeListener ( ( event ) -> { } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , page . count ) |
testCleanEmptyAttributes ( ) { root . attributes = new java . util . HashMap ( ) ; root . cleanEmptyElements ( ) ; "<AssertPlaceHolder>" ; } cleanEmptyElements ( ) { if ( ( ( attributes ) != null ) && ( attributes . isEmpty ( ) ) ) { attributes = null ; } if ( ( elements ) != null ) { for ( com . effektif . workflow . ... | org . junit . Assert . assertNull ( root . attributes ) |
parseArguments_keyonly ( ) { java . util . Map < java . lang . String , java . lang . String > parsed = com . asakusafw . windgate . cli . CommandLineUtil . parseArguments ( "a,b=c" ) . getPairs ( ) ; java . util . Map < java . lang . String , java . lang . String > answer = new java . util . HashMap ( ) ; answer . put... | org . junit . Assert . assertThat ( parsed , is ( answer ) ) |
exportCancel ( ) { final java . lang . String TEST_PROCESS_NAME = "Test<sp>process<sp>name<sp>2" ; createProcessModel ( TEST_PROCESS_NAME ) ; try { clickProcessModel ( TEST_PROCESS_NAME ) ; clickMenuBar ( "File" ) ; clickMenuItem ( "Export" ) ; delay ( ) ; driver . findElement ( org . apromore . portal . uitest . By . ... | org . junit . Assert . assertFalse ( isElementPresent ( org . apromore . portal . uitest . By . xpath ( EXPORT_DIALOG_XPATH ) ) ) |
bug48325 ( ) { org . apache . poi . ss . usermodel . Workbook wb = _testDataProvider . createWorkbook ( ) ; org . apache . poi . ss . usermodel . Sheet sheet = wb . createSheet ( "Test" ) ; trackColumnsForAutoSizingIfSXSSF ( sheet ) ; org . apache . poi . ss . usermodel . CreationHelper factory = wb . getCreationHelper... | org . junit . Assert . assertNotNull ( _testDataProvider . writeOutAndReadBack ( wb ) ) |
testGlobalEdgeUniqueConstraint ( ) { "<AssertPlaceHolder>" ; com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition < java . lang . String > definition = new com . puresoltechnologies . ductiledb . core . graph . schema . PropertyDefinition ( com . puresoltechnologies . ductiledb . core . gr... | org . junit . Assert . assertNull ( com . puresoltechnologies . ductiledb . core . graph . schema . DuctileDBSchemaManagerIT . schemaManager . getPropertyDefinition ( ElementType . EDGE , "property" ) ) |
testEmptyTargetedSequencingCompatibility ( ) { uk . ac . bbsrc . tgac . miso . core . data . impl . TargetedSequencing ts = new uk . ac . bbsrc . tgac . miso . core . data . impl . TargetedSequencing ( ) ; addTargetedSequencing ( ts , library ) ; "<AssertPlaceHolder>" ; } isTargetedSequencingCompatible ( uk . ac . bbsr... | org . junit . Assert . assertTrue ( service . isTargetedSequencingCompatible ( ts , library ) ) |
asListWithNoArguments ( ) { java . util . List l = java . util . Arrays . asList ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return model . size ( ) ; } | org . junit . Assert . assertSame ( 0 , l . size ( ) ) |
testSetMappingName ( ) { org . pentaho . hbase . shim . api . HBaseValueMeta hbMeta = getHBaseValueMeta ( ) ; hbMeta . setMappingName ( "test" ) ; "<AssertPlaceHolder>" ; } setMappingName ( java . lang . String ) { m_mappingName = mappingName ; } | org . junit . Assert . assertEquals ( "test" , hbMeta . m_mappingName ) |
_ignoresEmptyExamplesDuringExampleRuns ( ) { final java . lang . String spec = "\r\n\t\t\tpackage<sp>bootstrap\r\n\r\n\t\t\timport<sp>org.junit.*\r\n\r\n\t\t\tdescribe<sp>\"Pending\"<sp>{\r\n\r\n\t\t\t\tfact<sp>\"has<sp>no<sp>implementation<sp>in<sp>block<sp>expression\"{\r\n\t\t\t\t}<sp>\r\n\t\t\t\t\r\n\t\t\t\tfact<sp... | org . junit . Assert . < org . junit . runner . Result > assertThat ( _execute , _ignoreCountIs ) |
getEnd_nonEmptyPath_returnsLastElement ( ) { java . lang . String lastElement = "last" ; path = createPath ( "first" , "some" , lastElement ) ; java . util . Optional < java . lang . String > end = path . getEnd ( ) ; "<AssertPlaceHolder>" ; } getEnd ( ) { return java . util . Optional . ofNullable ( path . peek ( ) ) ... | org . junit . Assert . assertSame ( lastElement , end . get ( ) ) |
testToString ( ) { org . finra . herd . tools . common . databridge . HttpErrorResponseException testHttpErrorResponseException = new org . finra . herd . tools . common . databridge . HttpErrorResponseException ( testMessage , testStatusCode , testStatusDescription , testResponseMessage ) ; java . lang . String expect... | org . junit . Assert . assertEquals ( expectedHttpErrorResponseExceptionString , testHttpErrorResponseException . toString ( ) ) |
testGoToLastEvent ( ) { fixture . goToLastEvent ( ) ; long ts1 = getTimestamp ( ) ; long ts2 = fixture . getEndTime ( ) ; "<AssertPlaceHolder>" ; } getEndTime ( ) { return fEnd ; } | org . junit . Assert . assertEquals ( ts1 , ts2 ) |
testFromEbXML ( ) { transformer . toEbXML ( query , ebXML ) ; org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindFoldersForMultiplePatientsQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindFoldersForMultiplePatientsQuery ( ) ; transformer . fromE... | org . junit . Assert . assertEquals ( query , result ) |
resultShouldBeOneWhenOnlyOneActorAndNoInitiator ( ) { org . bonitasoft . engine . core . process . definition . model . SActorDefinition initiator = mock ( org . bonitasoft . engine . core . process . definition . model . SActorDefinition . class ) ; when ( org . bonitasoft . engine . api . impl . transaction . GetNumb... | org . junit . Assert . assertThat ( org . bonitasoft . engine . api . impl . transaction . GetNumberOfActorsTest . getNumberOfActors . getResult ( ) , org . hamcrest . core . Is . is ( 1 ) ) |
testForCorrectSeparatorBytes4 ( ) { java . lang . Object [ ] o1 = new java . lang . Object [ ] { "a" , "b" , null } ; java . lang . Object [ ] o2 = new java . lang . Object [ ] { null , "c" , "d" , "e" } ; org . apache . phoenix . schema . types . PDataType type = org . apache . phoenix . schema . types . PVarcharArray... | org . junit . Assert . assertArrayEquals ( expected , ptr . get ( ) ) |
testEnumBean ( ) { defaultContext ( ) ; org . apache . cxf . aegis . type . basic . BeanType type = new org . apache . cxf . aegis . type . basic . BeanType ( ) ; type . setTypeClass ( org . apache . cxf . aegis . type . basic . BeanTest . EnumBean . class ) ; type . setTypeMapping ( mapping ) ; type . setSchemaType ( ... | org . junit . Assert . assertTrue ( type . getDependencies ( ) . isEmpty ( ) ) |
testGetSecond ( ) { double recall = 0.2 ; gov . sandia . cognition . text . evaluation . DefaultPrecisionRecallPair instance = new gov . sandia . cognition . text . evaluation . DefaultPrecisionRecallPair ( ) ; instance . setRecall ( recall ) ; "<AssertPlaceHolder>" ; } getSecond ( ) { return this . getY ( ) ; } | org . junit . Assert . assertEquals ( recall , instance . getSecond ( ) , 0.0 ) |
validate_idTagInfoIsNotSetAndTransactionIdIsSet_returnFalse ( ) { confirmation . setTransactionId ( 42 ) ; boolean isValid = confirmation . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( false ) ) |
testGml2Wkt ( ) { java . lang . String queryStr = "PREFIX<sp>fn:<sp><http://jsa.aksw.org/fn/gml/><sp>SELECT<sp>?g<sp>{<sp>BIND(fn:gml2Wkt('<gml:LineString><gml:coordinates>6.8,5.3<sp>6.1,5.1</gml:coordinates></gml:LineString>')<sp>AS<sp>?g)<sp>}" ; java . lang . String [ ] tmpActual = new java . lang . String [ ] { nul... | org . junit . Assert . assertEquals ( expected , actual ) |
testStart_Class_Not_Found_Binder_With_Parent ( ) { java . lang . String binder = "com.englishtown.INVALID_BINDER" ; config . put ( "guice_binder" , binder ) ; java . lang . String main = com . englishtown . vertx . guice . integration . DependencyInjectionVerticle . class . getName ( ) ; doTest ( main ) ; verifyZeroInt... | org . junit . Assert . assertEquals ( 1 , getModules ( ) . size ( ) ) |
testReturnVoid ( ) { runAllExcept ( "control/Return" , "returnVoid" , io . vertx . codetrans . lang . scala . ScalaLang . class , ( ) -> { "<AssertPlaceHolder>" ; io . vertx . codetrans . ControlTest . o = null ; } ) ; } runAllExcept ( java . lang . String , java . lang . String , java . lang . Class , java . lang . Ru... | org . junit . Assert . assertNull ( io . vertx . codetrans . ControlTest . o ) |
testToListFromList ( ) { com . orientechnologies . orient . core . metadata . schema . ArrayList < java . lang . Object > list = new com . orientechnologies . orient . core . metadata . schema . ArrayList < java . lang . Object > ( ) ; list . add ( 1 ) ; list . add ( "2" ) ; java . lang . Object result = com . orientec... | org . junit . Assert . assertEquals ( result , list ) |
testAssociatePolicyGroupToDomain_unknownPolicyGroup_assertException ( ) { boolean exceptionOccured = false ; final javax . persistence . EntityManager mgr = mock ( javax . persistence . EntityManager . class ) ; final org . nhindirect . config . store . Domain domain = mock ( org . nhindirect . config . store . Domain ... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testBadDbPath ( ) { try { new apps . provisioning . config . ConfigData ( "./test/bad-db-path.properties" ) ; org . junit . Assert . fail ( "An<sp>incorrect<sp>value<sp>was<sp>passed<sp>as<sp>valid." ) ; } catch ( java . io . FileNotFoundException e ) { "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { or... | org . junit . Assert . assertTrue ( true ) |
beanBinder_nullRepresentationIsNotDisabled ( ) { com . vaadin . flow . data . binder . Binder < com . vaadin . flow . tests . data . bean . Person > binder = new com . vaadin . flow . data . binder . Binder ( com . vaadin . flow . tests . data . bean . Person . class ) ; binder . forField ( nameField ) . bind ( "firstN... | org . junit . Assert . assertEquals ( "" , nameField . getValue ( ) ) |
size ( ) { "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( java . util . Enumeration < ? > e = request . getAttributeNames ( ) ; e . hasMoreElements ( ) ; e . nextElement ( ) ) { size ++ ; } return size ; } | org . junit . Assert . assertThat ( map . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testShutdownInputThrowsIOException ( ) { io . sniffy . socket . IOException expected = new io . sniffy . socket . IOException ( ) ; when ( delegate , "shutdownInput" ) . thenThrow ( expected ) ; try { sniffySocket . shutdownInput ( ) ; org . junit . Assert . fail ( ) ; } catch ( io . sniffy . socket . IOException actua... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetCategoriesSync ( ) { try { java . lang . String jsonString = com . simplegeo . client . SimpleGeoPlacesClientTest . client . getCategories ( ) ; org . json . JSONArray json = new org . json . JSONArray ( jsonString ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( ... | org . junit . Assert . assertTrue ( ( ( json . length ( ) ) > 0 ) ) |
testUpdateUserNamespaceAuthorizationLowerCaseParameters ( ) { org . springframework . security . core . Authentication originalAuthentication = overrideSecurityContext ( ) ; org . finra . herd . model . api . xml . UserNamespaceAuthorizationKey key = new org . finra . herd . model . api . xml . UserNamespaceAuthorizati... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . UserNamespaceAuthorization ( userNamespaceAuthorizationEntity . getId ( ) , key , SUPPORTED_NAMESPACE_PERMISSIONS ) , resultUserNamespaceAuthorization ) |
allowStringAsBinaryResponseBody ( ) { final org . apache . oltu . oauth2 . client . response . OAuthResourceResponse resp = createBinaryResponse ( org . apache . oltu . oauth2 . client . response . OAuthResourceResponseTest . STRING_BYTES ) ; final byte [ ] bytes = org . apache . commons . io . IOUtils . toByteArray ( ... | org . junit . Assert . assertArrayEquals ( org . apache . oltu . oauth2 . client . response . OAuthResourceResponseTest . STRING_BYTES , bytes ) |
testCtfIterator_noinit ( ) { try ( org . eclipse . tracecompass . internal . tmf . ctf . core . trace . iterator . CtfIterator result = ( ( org . eclipse . tracecompass . internal . tmf . ctf . core . trace . iterator . CtfIterator ) ( trace . createIterator ( ) ) ) ) { "<AssertPlaceHolder>" ; } } createIterator ( ) { ... | org . junit . Assert . assertNotNull ( result ) |
testDouble ( ) { int x = 10 ; double theValue ; if ( x > 10 ) { theValue = - 10 ; } else { theValue = - 20 ; } "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ( - 20 ) , theValue , 0 ) |
get_Existing_NotSameKey ( ) { java . lang . Long existingKey = java . lang . System . currentTimeMillis ( ) ; java . lang . String existingValue = "value" + existingKey ; cache . put ( existingKey , existingValue ) ; "<AssertPlaceHolder>" ; } get ( K ) { return writtenKeys . get ( key ) ; } | org . junit . Assert . assertEquals ( existingValue , cache . get ( new java . lang . Long ( existingKey ) ) ) |
testBadKeyAlias ( ) { java . util . Map < java . lang . String , java . lang . String > overrides = getOverridesForEncryption ( ) ; overrides . put ( ( ( ( EncryptionConfiguration . ENCRYPTION_PREFIX ) + "." ) + ( EncryptionConfiguration . ACTIVE_KEY ) ) , "invalid" ) ; channel = org . apache . flume . channel . file .... | org . junit . Assert . assertFalse ( channel . isOpen ( ) ) |
whenCheckingListSize_ThenSizeEqualsToInit ( ) { com . baeldung . migration . junit4 . BeforeAndAfterAnnotationsUnitTest . LOG . info ( "executing<sp>test" ) ; "<AssertPlaceHolder>" ; list . add ( "another<sp>test" ) ; } size ( ) { return internal . length ; } | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
testRemovesValue ( ) { com . eclipsesource . tabris . internal . ClientStoreImpl store = new com . eclipsesource . tabris . internal . ClientStoreImpl ( ) ; store . add ( "foo" , "bar" ) ; store . remove ( "foo" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { whenNull ( shortcut ) . throwIllegalArgument ( ... | org . junit . Assert . assertNull ( store . get ( "foo" ) ) |
getCreatorTest ( ) { org . w3c . dom . Document dom = documentBuilder . parse ( new org . xml . sax . InputSource ( new java . io . StringReader ( ( ( "<creator><creatorName>" + ( c2 . getCreatorName ( ) ) ) + "</creatorName></creator>" ) ) ) ) ; org . w3c . dom . Element creator = ( ( org . w3c . dom . Element ) ( dom... | org . junit . Assert . assertEquals ( c2 , org . sagebionetworks . doi . datacite . DataciteXmlTranslatorImpl . getCreator ( creator ) ) |
manageModificationProcess_VSYSTEM_CREATING ( ) { paramHandler . getIaasContext ( ) . setVSystemStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . NORMAL ) ; doReturn ( Boolean . TRUE ) . when ( vSystemProcessor . vsysComm ) . startAllEFMs ( paramHandler ) ; org . oscm . app . iaas . data . FlowState newState... | org . junit . Assert . assertEquals ( FlowState . VSERVERS_STARTING , newState ) |
testGetInOneWorkerWithConditionThatDoesNotMatch2 ( ) { System . out . println ( "===><sp>Test<sp>started<sp><===" ) ; org . ourgrid . system . units . BrokerUnit brokerUnit = new org . ourgrid . system . units . BrokerUnit ( org . ourgrid . system . units . BrokerUnit . BROKER_PROPERTIES_FILENAME , 1 ) ; unitManager . ... | org . junit . Assert . assertFalse ( getFile . exists ( ) ) |
loginFail ( ) { org . apache . activemq . artemis . spi . core . security . jaas . Krb5LoginModule underTest = new org . apache . activemq . artemis . spi . core . security . jaas . Krb5LoginModule ( ) ; final javax . security . auth . Subject subject = new javax . security . auth . Subject ( ) ; underTest . initialize... | org . junit . Assert . assertFalse ( underTest . login ( ) ) |
sortAlreadyOrdered ( ) { final int [ ] values = new int [ 25000 ] ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { values [ i ] = i ; } final int comparisons = sortData ( values ) ; "<AssertPlaceHolder>" ; } sortData ( int [ ] ) { try ( final com . dremio . sabot . sort . TestSplayTree . SplayTreeImpl tree = new ... | org . junit . Assert . assertTrue ( ( comparisons < ( values . length ) ) ) |
setStyleMultipleRemove ( ) { c . addStyleName ( "foo" ) ; c . setStyleName ( "foo" , false ) ; c . setStyleName ( "foo" , false ) ; "<AssertPlaceHolder>" ; } getStyleName ( ) { return styleName ; } | org . junit . Assert . assertEquals ( "" , c . getStyleName ( ) ) |
depsHaveStripAndDebugFlavorsPropagated ( ) { com . facebook . buck . core . model . BuildTarget bundleTargetWithStripFlavor = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//bar:bundle#iphoneos-x86_64,strip-all,dwarf-and-dsym" ) ; com . facebook . buck . core . model . BuildTarget unflavore... | org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableSortedSet . < com . facebook . buck . core . model . BuildTarget > naturalOrder ( ) . add ( unflavoredDepAfterPropagation ) . add ( flavoredDep ) . add ( flavoredDepNotInDomainAfterPropagation ) . add ( stripFlavorOnlyAfterPropagation ) . ... |
testCreateAllergiesReactionsSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . AllergiesReactionsSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createAllergiesReactio... | org . junit . Assert . assertNotNull ( section ) |
testClassifier ( ) { com . navercorp . pinpoint . test . plugin . DependencyResolver resolver = com . navercorp . pinpoint . test . plugin . DependencyResolver . get ( ) ; java . util . Map < java . lang . String , java . util . List < org . eclipse . aether . artifact . Artifact > > sets = resolver . resolveDependency... | org . junit . Assert . assertFalse ( sets . isEmpty ( ) ) |
testPartitionPruningWithMetadataCache_3 ( ) { java . lang . String tableName = "orders_ctas_varchar" ; test ( "use<sp>dfs" ) ; test ( ( "create<sp>table<sp>%s<sp>(o_orderdate,<sp>o_orderpriority)<sp>partition<sp>by<sp>(o_orderpriority)<sp>" + "as<sp>select<sp>o_orderdate,<sp>o_orderpriority<sp>from<sp>dfs.`multilevel/p... | org . junit . Assert . assertEquals ( expectedRowCount , actualRowCount ) |
testEqualsAndHashCode_1 ( ) { net . roboconf . core . model . beans . ApplicationTemplate app1 = new net . roboconf . core . model . beans . ApplicationTemplate ( ) ; app1 . setName ( "app" ) ; app1 . setVersion ( "snapshot" ) ; net . roboconf . core . model . beans . ApplicationTemplate app2 = new net . roboconf . cor... | org . junit . Assert . assertEquals ( 1 , set . size ( ) ) |
fout ( ) { org . mockito . Mockito . reset ( lockService ) ; org . mockito . Mockito . when ( lockService . verkrijgLockVoorAnummers ( org . mockito . Matchers . anySetOf ( nl . bzk . migratiebrp . isc . jbpm . uc202 . Long . class ) , org . mockito . Matchers . anyLong ( ) ) ) . thenReturn ( 42L ) ; org . mockito . Mo... | org . junit . Assert . assertTrue ( processEnded ( ) ) |
testGetConnectionTypes ( ) { "<AssertPlaceHolder>" ; } getConnectionTypes ( ) { return connectionTypes ; } | org . junit . Assert . assertThat ( target . getConnectionTypes ( ) , org . hamcrest . CoreMatchers . is ( "" ) ) |
testAddTwoSavedDocumentsWithoutTx ( ) { com . orientechnologies . orient . core . record . impl . ODocument docOne = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; com . orientechnologies . orient . core . record . impl . ODocument docTwo = new com . orientechnologies . orient . core . re... | org . junit . Assert . assertEquals ( ridBag . size ( ) , 0 ) |
testFromArrayToGenericOrderPreservingSet ( ) { java . lang . String [ ] sa = new java . lang . String [ ] { "567" , "-765" , "0" , "-900" } ; java . util . Set < java . lang . Long > s = converter . convert ( sa ) . to ( new org . osgi . util . converter . TypeReference < java . util . Set < java . lang . Long > > ( ) ... | org . junit . Assert . assertEquals ( expected , l ) |
testCopyFromCsvToArrow ( ) { lombok . val recordsPair = records ( ) ; java . nio . file . Path p = java . nio . file . Files . createTempFile ( "csvwritetest" , ".csv" ) ; org . apache . commons . io . FileUtils . write ( p . toFile ( ) , recordsPair . getFirst ( ) ) ; p . toFile ( ) . deleteOnExit ( ) ; org . datavec ... | org . junit . Assert . assertEquals ( 10 , next . size ( ) ) |
testExceptions3 ( ) { java . lang . String imei = "" ; try { imei = edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . taintedString ( "abcde3" ) ; int [ ] arr = new int [ 42 ] ; if ( ( arr [ 32 ] ) > 0 ) imei = "" ; } catch ( java . lang . RuntimeException ex ) { "<AssertPlaceHolder>" ; } } getTain... | org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . getTaint ( imei ) ) != 0 ) ) |
testRexQueryGeneration ( ) { java . lang . String QUERY = "rex<sp>field=_raw<sp>\"From:<sp>(?<from>.*)<sp>To:<sp>(?<to>.*)\"" ; org . araqne . logdb . query . parser . RexParser parser = new org . araqne . logdb . query . parser . RexParser ( ) ; parser . setQueryParserService ( queryParserService ) ; org . araqne . lo... | org . junit . Assert . assertEquals ( QUERY , query ) |
getSubscribedListenersInThreadOnlyTest ( ) { org . threadly . concurrent . event . ListenerHelper < org . threadly . concurrent . event . ListenerHelperTest . TestInterface > lh = makeListenerHelper ( org . threadly . concurrent . event . ListenerHelperTest . TestInterface . class ) ; org . threadly . concurrent . even... | org . junit . Assert . assertTrue ( lh . getSubscribedListeners ( ) . contains ( ti ) ) |
velocityTemplateTest ( ) { try { org . opennaas . extensions . router . junos . actionssets . actions . test . ip . RemoveIPv6ActionTest . action . prepareMessage ( ) ; java . lang . String expectedMessage = org . opennaas . core . resources . helpers . XmlHelper . formatXML ( textFileToString ( "/actions/ip/removeIPv6... | org . junit . Assert . assertEquals ( expectedMessage , actionMessage ) |
givenList_whenIndexOf_thenIndexZeroIsReturned ( ) { java . util . List < java . lang . Object > list = new com . baeldung . java . list . CustomList ( ) ; list . add ( "baeldung" ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . Object ) { for ( int i = 0 ; i < ( internal . length ) ; i ++ ) { if ( object . equals ... | org . junit . Assert . assertEquals ( 0 , list . indexOf ( "baeldung" ) ) |
goAwayFrameShouldMatch ( ) { final java . lang . String text = "test" ; final io . netty . buffer . ByteBuf data = io . netty . handler . codec . http2 . Http2FrameRoundtripTest . buf ( text . getBytes ( ) ) ; writer . writeGoAway ( ctx , io . netty . handler . codec . http2 . Http2FrameRoundtripTest . STREAM_ID , io .... | org . junit . Assert . assertEquals ( data , captor . getValue ( ) ) |
testSerialization ( ) { org . jfree . chart . renderer . category . StatisticalBarRenderer r1 = new org . jfree . chart . renderer . category . StatisticalBarRenderer ( ) ; org . jfree . chart . renderer . category . StatisticalBarRenderer r2 = ( ( org . jfree . chart . renderer . category . StatisticalBarRenderer ) ( ... | org . junit . Assert . assertEquals ( r1 , r2 ) |
testServicesAnnotatedButNotImplements ( ) { @ com . liferay . portal . kernel . spring . osgi . OSGiBeanProperties ( service = java . io . Serializable . class ) class C { } java . util . Set < java . lang . String > interfaceNames = OSGiBeanProperties . Service . interfaceNames ( new C ( ) , C . class . getAnnotation ... | org . junit . Assert . assertEquals ( interfaceNames . toString ( ) , 1 , interfaceNames . size ( ) ) |
shouldReturnFalseWhenCollectionDoesNotContainsAProvidedValue ( ) { final java . util . Collection collection = com . google . common . collect . Sets . newHashSet ( 10 , 20 , 30 ) ; final java . lang . Object [ ] values = new java . lang . Object [ ] { 1 , 2 , 3 } ; final boolean result = uk . gov . gchq . gaffer . com... | org . junit . Assert . assertFalse ( result ) |
testSetArrayItemB ( ) { propertyUtilsBean . setIndexedProperty ( bean , "stringArray" , 1 , "modified-1" ) ; "<AssertPlaceHolder>" ; } getStringArray ( int ) { return stringArray [ index ] ; } | org . junit . Assert . assertEquals ( "modified-1" , bean . getStringArray ( 1 ) ) |
primitives ( ) { beanMap . put ( "id" , 5 ) ; "<AssertPlaceHolder>" ; } getBean ( ) { return bean ; } | org . junit . Assert . assertEquals ( 5 , ( ( com . querydsl . core . util . Entity ) ( beanMap . getBean ( ) ) ) . getId ( ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . friendly . url . model . FriendlyURLEntryLocalization > friendlyURLEntryLocalizations = _... | org . junit . Assert . assertTrue ( friendlyURLEntryLocalizations . isEmpty ( ) ) |
testRandomSimpleFF ( ) { long seed = 123456789 ; com . github . neuralnetworks . tensor . Tensor seqResult = testRandomSimpleFF ( Runtime . CPU_SEQ , seed ) ; com . github . neuralnetworks . tensor . Tensor openclResult = testRandomSimpleFF ( Runtime . OPENCL , seed ) ; "<AssertPlaceHolder>" ; } isEqual ( com . github ... | org . junit . Assert . assertTrue ( isEqual ( seqResult , openclResult ) ) |
testExpiredAssertion ( ) { org . picketlink . identity . federation . saml . v2 . assertion . NameIDType nameIdType = new org . picketlink . identity . federation . saml . v2 . assertion . NameIDType ( ) ; nameIdType . setValue ( "somename" ) ; org . picketlink . identity . federation . saml . v2 . assertion . Assertio... | org . junit . Assert . assertTrue ( org . picketlink . identity . federation . core . saml . v2 . util . AssertionUtil . hasExpired ( assertion ) ) |
testAddInvitationProjectsWithEmpty ( ) { java . util . List < com . onboard . domain . model . Project > ret = invitationManager . addInvitationProjects ( invitation , projectListEmpty ) ; "<AssertPlaceHolder>" ; } addInvitationProjects ( com . onboard . domain . model . Invitation , java . util . List ) { if ( ( proje... | org . junit . Assert . assertSame ( ret , projectListEmpty ) |
getServletURI_emptyStringServlet ( ) { final java . lang . String uri = "" ; final java . lang . String expected = "/" ; mock . checking ( new org . jmock . Expectations ( ) { { allowing ( req ) . getServletPath ( ) ; will ( returnValue ( uri ) ) ; allowing ( req ) . getPathInfo ( ) ; will ( returnValue ( null ) ) ; } ... | org . junit . Assert . assertEquals ( expected , handler . getServletURI ( req ) ) |
chainedMultiSelectHashWithQuotedKeys ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Object ( java . util . Arrays . asList ( new io . burt . jmespath . node . CreateObjectNode . Entry < java . lang . Object > ( "foo" , String ( "bar" ) ) , new io . burt . jmespath . node . CreateObjectNode ... | org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) ) |
testIntegerField ( ) { org . lilyproject . hbaseindex . IndexDefinition indexDef = new org . lilyproject . hbaseindex . IndexDefinition ( "index" ) ; org . lilyproject . hbaseindex . IntegerIndexFieldDefinition field = indexDef . addIntegerField ( "intfield" ) ; org . codehaus . jackson . node . ObjectNode json = index... | org . junit . Assert . assertEquals ( field . getName ( ) , newField . getName ( ) ) |
testNoNullValuesParameterNull ( ) { com . twelvemonkeys . lang . Map < java . lang . String , ? > map = new com . twelvemonkeys . lang . HashMap < java . lang . String , java . lang . Object > ( ) { { put ( "foo" , 1 ) ; put ( "bar" , 2 ) ; put ( "baz" , 3 ) ; } } ; "<AssertPlaceHolder>" ; } noNullValues ( java . util ... | org . junit . Assert . assertSame ( map , com . twelvemonkeys . lang . Validate . noNullValues ( map , null ) ) |
createPCJ ( ) { final org . apache . accumulo . core . client . Connector connector = getClusterInstance ( ) . getConnector ( ) ; final java . lang . String ryaInstanceName = testInstance . getRyaInstanceName ( ) ; try ( final org . apache . rya . indexing . pcj . storage . PrecomputedJoinStorage pcjStorage = new org .... | org . junit . Assert . assertEquals ( expectedDetails , detailsMap . get ( pcjId ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . document . library . file . rank . model . DLFileRank newDLFileRank = addDLFileRank ( ) ; com . liferay . document . library . file . rank . model . DLFileRank existingDLFileRank = _persistence . fetchByPrimaryKey ( newDLFileRank . getPrimaryKey ( ) ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( existingDLFileRank , newDLFileRank ) |
testIsX ( ) { org . nd4j . autodiff . opvalidation . List < java . lang . String > failed = new org . nd4j . autodiff . opvalidation . ArrayList ( ) ; for ( int i = 0 ; i < 4 ; i ++ ) { org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . sa... | org . junit . Assert . assertEquals ( failed . toString ( ) , 0 , failed . size ( ) ) |
testThatRunnerIsProperlyMarshalized ( ) { info . novatec . testit . livingdoc . server . domain . Runner runner = info . novatec . testit . livingdoc . server . domain . Runner . newInstance ( "RUNNER-1" ) ; runner . setServerName ( "SERVER_NAME" ) ; runner . setServerPort ( "SERVER_PORT" ) ; info . novatec . testit . ... | org . junit . Assert . assertEquals ( params , runner . marshallize ( ) ) |
findFeatureBasicWithOneResult_NotSameName_butScoreKO ( ) { java . lang . String lat = "adm1name" 1 ; java . lang . String lng = "44" ; com . vividsolutions . jts . geom . Point point = com . gisgraphy . helper . GeolocHelper . createPoint ( new java . lang . Float ( lng ) , new java . lang . Float ( lat ) ) ; java . la... | org . junit . Assert . assertEquals ( null , actualFeatureId ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.