input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
notADirectory ( ) { java . lang . String ufsDirectory = mFileSystem . getStatus ( alluxio . client . fs . CheckConsistencyIntegrationTest . DIRECTORY ) . getUfsPath ( ) ; alluxio . underfs . UnderFileSystem ufs = UnderFileSystem . Factory . create ( ufsDirectory , alluxio . conf . ServerConfiguration . global ( ) ) ; u... | org . junit . Assert . assertEquals ( expected , result ) |
testAtan2_2 ( ) { org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . create ( 10 ) . assign ( 1.0 ) ; org . nd4j . linalg . api . ndarray . INDArray y = org . nd4j . linalg . factory . Nd4j . create ( 10 ) . assign ( 0.0 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org... | org . junit . Assert . assertEquals ( exp , z ) |
shouldGiveVoiceMailNumber ( ) { org . robolectric . Shadows . shadowOf ( telephonyManager ) . setVoiceMailNumber ( "123" ) ; "<AssertPlaceHolder>" ; } getVoiceMailNumber ( ) { return voiceMailNumber ; } | org . junit . Assert . assertEquals ( "123" , telephonyManager . getVoiceMailNumber ( ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . RepositoryEntry newRepositoryEntry = addRepositoryEntry ( ) ; com . liferay . portal . kernel . model . RepositoryEntry existingRepositoryEntry = _persistence . findByPrimaryKey ( newRepositoryEntry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( existingRepositoryEntry , newRepositoryEntry ) |
testAnnotationRemoved ( ) { final org . hyalinedto . test . domainclasses . Person dto = org . hyalinedto . api . Hyaline . dtoFromScratch ( john , new org . hyalinedto . api . DTO ( ) { } ) ; java . lang . reflect . Field field = dto . getClass ( ) . getDeclaredField ( "address" ) ; org . hyalinedto . test . annotatio... | org . junit . Assert . assertEquals ( null , annotation ) |
getFixedNextInvocationValue_A$int$int$RawCrontabLine ( ) { int arg0 = 0 ; int arg1 = 60 ; com . github . seratch . taskun . scheduler . crond . CrontabElement arg2 = new com . github . seratch . taskun . scheduler . crond . CrontabElement ( "*/3" ) ; int actual = parser . getFixedNextInvocationValue ( arg0 , arg1 , arg... | org . junit . Assert . assertEquals ( expected , actual ) |
testIsValidSudoku ( ) { java . lang . String [ ] s = new java . lang . String [ ] { ".87654321" , "2........" , "3........" , "4........" , "5........" , "6........" , "7........" , "8........" , "9........" } ; char [ ] [ ] board = getBoard ( s ) ; "<AssertPlaceHolder>" ; } isValidSudoku ( char [ ] [ ] ) { for ( int i... | org . junit . Assert . assertTrue ( t . isValidSudoku ( board ) ) |
shouldRejectHostMachines ( ) { cluster . setNumberOfHostMachines ( 2 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = cTest . validate ( cluster , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atla... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) ) |
testGetActivityItems ( ) { "<AssertPlaceHolder>" ; } getActivityItems ( ) { return javafx . collections . FXCollections . unmodifiableObservableList ( activityItems ) ; } | org . junit . Assert . assertNotNull ( logger . getActivityItems ( ) ) |
testBatcher ( ) { try { com . marklogic . client . io . DocumentMetadataHandle documentMetadata = new com . marklogic . client . io . DocumentMetadataHandle ( ) ; com . marklogic . client . datamovement . WriteBatcher batcher = moveMgr . newWriteBatcher ( ) . withDefaultMetadata ( documentMetadata ) ; "<AssertPlaceHold... | org . junit . Assert . assertTrue ( ( ( batcher . getDocumentMetadata ( ) ) == documentMetadata ) ) |
testGetReportDownloadUrlWithOptions ( ) { com . google . api . ads . admanager . axis . utils . v201808 . ReportDownloader downloader = new com . google . api . ads . admanager . axis . utils . v201808 . ReportDownloader ( reportService , 1 ) ; when ( reportService . getReportJobStatus ( org . mockito . Matchers . anyL... | org . junit . Assert . assertEquals ( "https://www.google.com/" , downloadUrl . toString ( ) ) |
Test_GlobPatternMatcher_AbsolutePath_InRoot ( ) { java . nio . file . Path root = java . nio . file . Paths . get ( "c:\\temp" ) ; java . nio . file . Path examplePath = java . nio . file . Paths . get ( "c:\\temp\\blabla.sql" ) ; java . lang . String pattern = java . lang . String . format ( "glob:%1$s%2$s%3$s" , root... | org . junit . Assert . assertFalse ( testMatcher . matches ( examplePath ) ) |
test_isQualifierEqual_AnnotationLiteral_nonEmptyQualifier ( ) { org . apache . webbeans . test . util . TestQualifier q1 = new org . apache . webbeans . test . util . TestQualifierAnnotationLiteral ( ) ; org . apache . webbeans . test . util . TestQualifier q2 = new org . apache . webbeans . test . util . TestQualifier... | org . junit . Assert . assertTrue ( org . apache . webbeans . util . AnnotationUtil . isCdiAnnotationEqual ( q1 , q2 ) ) |
loadSnapshotAndSave_theResultTreeIdShouldBeTheSame ( ) { writeSomethingToCache ( ) ; org . eclipse . jgit . lib . ObjectId loaded = commit ( ) . getTree ( ) ; org . eclipse . jgit . lib . ObjectId saved = com . beijunyi . parallelgit . utils . io . TreeSnapshot . load ( loaded , repo ) . save ( repo ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( loaded , saved ) |
testSelectOrgUnit ( ) { organizationSelectorDisplayer . filterUpdate ( org . kie . workbench . common . screens . contributors . client . COLUMN_ORG , 0 ) ; org . dashbuilder . dataset . DataSet dataSet = allCommitsDisplayer . getDataSetHandler ( ) . getLastDataSet ( ) ; "<AssertPlaceHolder>" ; } getRowCount ( ) { retu... | org . junit . Assert . assertEquals ( dataSet . getRowCount ( ) , 1 ) |
testEqualityWithAnotherActionType ( ) { edu . harvard . iq . dataverse . actionlogging . ActionLogRecord record = new edu . harvard . iq . dataverse . actionlogging . ActionLogRecord ( ) ; record . setStartTime ( this . referenceRecord . getStartTime ( ) ) ; record . setEndTime ( this . referenceRecord . getEndTime ( )... | org . junit . Assert . assertFalse ( this . referenceRecord . equals ( record ) ) |
testLength ( ) { java . lang . Object [ ] expected = new java . lang . Object [ ] { 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 } ; java . lang . Object [ ] actual = result . stream ( ) . map ( Token :: getLength ) . toArray ( ) ; "<AssertPlaceHolder>" ; } stream ( ) { return java . util . stream . StreamSupp... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
test_hour_shouldReturnHourBetween0and11_whenTimeBetween0and11 ( ) { java . util . Calendar calendar = org . openl . util . DateToolTest . createCalendar ( 15 , 6 , 2018 ) ; for ( int hour = 0 ; hour < 12 ; hour ++ ) { calendar . set ( Calendar . HOUR_OF_DAY , hour ) ; int actual = org . openl . util . DateTool . hour (... | org . junit . Assert . assertEquals ( hour , actual ) |
testRemove ( ) { com . liferay . portal . kernel . model . RepositoryEntry newRepositoryEntry = addRepositoryEntry ( ) ; _persistence . remove ( newRepositoryEntry ) ; com . liferay . portal . kernel . model . RepositoryEntry existingRepositoryEntry = _persistence . fetchByPrimaryKey ( newRepositoryEntry . getPrimaryKe... | org . junit . Assert . assertNull ( existingRepositoryEntry ) |
testNoOverflow ( ) { brown . tracingplane . baggageprotocol . BaggageReader reader = makeBaggage ( ) ; for ( int i = 0 ; i < ( payloads . length ) ; i ++ ) { reader . nextData ( ) ; } "<AssertPlaceHolder>" ; } overflowAtoms ( ) { finish ( ) ; return overflowAtoms ; } | org . junit . Assert . assertNull ( reader . overflowAtoms ( ) ) |
shouldNotCacheTheSameFile ( ) { java . io . File cachedFile = cacheFile ( ) ; cachedFile . setLastModified ( com . threerings . getdown . cache . ResourceCacheTest . YESTERDAY ) ; long expectedLastModified = cachedFile . lastModified ( ) ; java . io . File sameCachedFile = cacheFile ( ) ; "<AssertPlaceHolder>" ; } cach... | org . junit . Assert . assertEquals ( expectedLastModified , sameCachedFile . lastModified ( ) ) |
testCount ( ) { java . lang . String sqlText = java . lang . String . format ( ( "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 2 + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<... | org . junit . Assert . assertEquals ( ( ( "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIES<sp>useSpark<sp>=<sp>%s<sp>\n<sp>order<sp>by<sp>dept,<sp>empnum" 7 + sqlText ) + "count(salary)<sp>over<sp>(Partition<sp>by<sp>dept)<sp>as<sp>c<sp>from<sp>%s<sp>--SPLICE-PROPERTIE... |
testFindInObjectLiteralDefault ( ) { java . lang . String input = "a<sp>=<sp>{<sp>\"foo\"<sp>:<sp>{},<sp>\"default\"<sp>:<sp>{}<sp>}" ; org . eclipse . rap . clientbuilder . TokenList tokens = org . eclipse . rap . clientbuilder . TestUtil . parse ( input ) ; int startSelectedExpr = tokens . findInObjectLiteral ( "bar"... | org . junit . Assert . assertEquals ( 10 , startSelectedExpr ) |
testGetEmptyWrapperJar ( ) { System . out . println ( "getWrapperJar" ) ; com . espirit . moddev . cli . commands . server . ServerStartCommand instance = createTestling ( ) ; java . lang . String result = instance . getWrapperJar ( ) ; "<AssertPlaceHolder>" ; } getWrapperJar ( ) { return wrapperJar ; } | org . junit . Assert . assertNull ( result ) |
createBoundingRectangleFromQuadPointsTest02 ( ) { float [ ] points = new float [ ] { 0 , 0 , 2 , 1 , 1 , 2 , - 2 , 1 , 0 } ; com . itextpdf . kernel . pdf . PdfArray quadpoints = new com . itextpdf . kernel . pdf . PdfArray ( points ) ; boolean exception = false ; try { com . itextpdf . kernel . geom . Rectangle . crea... | org . junit . Assert . assertTrue ( exception ) |
testRewriteRTxt ( ) { org . junit . Assume . assumeTrue ( ( ( com . facebook . buck . util . environment . Platform . detect ( ) ) != ( com . facebook . buck . util . environment . Platform . WINDOWS ) ) ) ; java . nio . file . Path inputRTxt = tmpFolder . getRoot ( ) . resolve ( "input.R.txt" ) ; java . lang . String ... | org . junit . Assert . assertEquals ( expectedOutput , filesystem . readFileIfItExists ( outputRTxt ) . get ( ) ) |
testSanitizerGoodStyle ( ) { java . lang . String input = "<p<sp>style=\"text-decoration:<sp>line-through;padding-left:<sp>20.0px;\">content</p>" ; "<AssertPlaceHolder>" ; } sanitize ( java . lang . String ) { return com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( input , false ) ; } | org . junit . Assert . assertEquals ( input , com . github . bordertech . wcomponents . util . HtmlSanitizerUtil . sanitize ( input ) ) |
shouldReturnSameResultWithPyhtonImplementation ( ) { java . lang . String clientSecret = "5f395ee5acae448bbbcf01a251c480f6" ; java . lang . String jsonResponse = "[{\"subscription_id\":\"1\",\"object\":\"user\",\"object_id\":\"1234\",\"changed_aspect\":\"media\",\"time\":1297286541},{\"subscription_id\":\"2\",\"object\... | org . junit . Assert . assertTrue ( result . isSuccess ( ) ) |
testMarkingWorks ( ) { final java . io . File temp = java . io . File . createTempFile ( "temp-file-name" , ".tmp" ) ; final org . apache . commons . vfs2 . FileSystemManager fileSystemManager = org . apache . commons . vfs2 . VFS . getManager ( ) ; try ( org . apache . commons . vfs2 . FileObject file = fileSystemMana... | org . junit . Assert . assertEquals ( org . apache . commons . vfs2 . provider . DefaultFileContentTest . expected , new java . lang . String ( data ) . trim ( ) ) |
testXPathHelperWithNamespaceTextPath ( ) { try { java . lang . String xmlString = getFileContentsAsString ( ( ( ddf . catalog . impl . XPathHelperTest . TEST_DATA_PATH ) + ( ddf . catalog . impl . XPathHelperTest . INPUT_FILE ) ) ) ; ddf . util . XPathHelper xHelper = new ddf . util . XPathHelper ( xmlString ) ; org . ... | org . junit . Assert . assertEquals ( 1 , nodeList . getLength ( ) ) |
testEncryptDecryptStream ( ) { final byte [ ] plainBytes = new byte [ ( ddf . security . encryption . crypter . Crypter . CHUNK_SIZE ) * 3 ] ; new java . security . SecureRandom ( ) . nextBytes ( plainBytes ) ; final java . io . InputStream plainInputStream = new java . io . ByteArrayInputStream ( plainBytes ) ; final ... | org . junit . Assert . assertArrayEquals ( plainBytes , decryptedBytes ) |
lookUpEndpointTest ( ) { names . clear ( ) ; names . add ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . ENDPOINTURL ) ; expect ( sl . lookup ( org . talend . esb . locator . service . rest . LocatorRestServiceTest . SERVICE_NAME ) ) . andStubReturn ( names ) ; expect ( sl . getEndpoint ( org... | org . junit . Assert . assertTrue ( endpointRef . toString ( ) . equals ( expectedRef . toString ( ) ) ) |
shouldCacheSmallSetOfLabelsPerNode ( ) { org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache cache = new org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCache ( NumberArrayFactory . AUTO_WITHOUT_PAGECACHE , 5 , org . neo4j . unsafe . impl . batchimport . cache . NodeLabelsCacheTest . CHUNK... | org . junit . Assert . assertArrayEquals ( new int [ ] { 1 , 2 , 3 } , readLabels ) |
testEventWithOneStatementWithOneListener ( ) { org . opencredo . esper . EsperStatement statement = addTestStatement ( ) ; org . opencredo . esper . sample . CallRecordingListener listener = this . addListenerToStatement ( statement ) ; template . addStatement ( statement ) ; setupTemplateAndSendSampleEvent ( ) ; "<Ass... | org . junit . Assert . assertEquals ( 1 , listener . getNumberOfTimesInvoked ( ) ) |
testCopyToWriterWithBuf ( ) { org . eclipse . jgit . lfs . lib . AnyLongObjectId id1 = org . eclipse . jgit . lfs . test . LongObjectIdTestUtils . hash ( "test" ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( 64 ) ; java . io . OutputStreamWriter w = new java . io . OutputStreamWriter... | org . junit . Assert . assertEquals ( id1 , org . eclipse . jgit . lfs . lib . LongObjectId . fromString ( os . toByteArray ( ) , 0 ) ) |
shouldNotPollWhenAllGroupEmpty ( ) { org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistry registry = new org . openkilda . wfm . topology . flow . transactions . FlowCommandRegistry ( ) ; registerBatchWith2Groups ( registry ) ; registry . pollNextGroup ( org . openkilda . wfm . topology . flow .... | org . junit . Assert . assertThat ( currentGroup , org . hamcrest . Matchers . empty ( ) ) |
serializationGetProfile ( ) { org . digidoc4j . impl . bdoc . Container container = this . createEmptyContainerBy ( Container . DocumentType . BDOC ) ; container . addDataFile ( "src/test/resources/testFiles/helper-files/test.txt" , "text/plain" ) ; this . createSignatureBy ( container , this . pkcs12SignatureToken ) ;... | org . junit . Assert . assertEquals ( signatureProfileBeforeSerialization , signatureProfileAfterSerialization ) |
shouldComapareDigitsOnlyIdentifiersNumerically ( ) { com . github . zafarkhaja . semver . MetadataVersion v1 = new com . github . zafarkhaja . semver . MetadataVersion ( new java . lang . String [ ] { "alpha" , "123" } ) ; com . github . zafarkhaja . semver . MetadataVersion v2 = new com . github . zafarkhaja . semver ... | org . junit . Assert . assertTrue ( ( 0 > ( v1 . compareTo ( v2 ) ) ) ) |
testVerifyWithInvalidKeyStoreChooserFails ( ) { java . lang . String signature = signer . sign ( com . springcryptoutils . core . signature . Base64EncodedSignerAndVerifierWithChoosersByAliasImplTest . keyStoreChooser , com . springcryptoutils . core . signature . Base64EncodedSignerAndVerifierWithChoosersByAliasImplTe... | org . junit . Assert . assertNotNull ( signature ) |
renameIfDuplicatedToConstructorArgNames_A$String$List$List_notDuplicated ( ) { org . junithelper . core . extractor . ClassMetaExtractor target = new org . junithelper . core . extractor . ClassMetaExtractor ( config ) ; java . lang . String argName = "name" ; java . util . List < java . lang . String > constructorArgs... | org . junit . Assert . assertEquals ( expected , actual ) |
getList_null ( ) { software . amazon . awssdk . services . dynamodb . document . Item item = new software . amazon . awssdk . services . dynamodb . document . Item ( ) ; "<AssertPlaceHolder>" ; } getList ( java . lang . String ) { java . lang . Object val = attributes . get ( attrName ) ; if ( val == null ) { return nu... | org . junit . Assert . assertNull ( item . getList ( "test" ) ) |
tailEmptyFile ( ) { alluxio . client . file . FileSystemTestUtils . createByteFile ( mFileSystem , "/emptyFile" , WritePType . MUST_CACHE , 0 ) ; int ret = mFsShell . run ( "tail" , "/emptyFile" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . grpc . RunPRequest , io . grpc . stub . StreamObserver ) { alluxio . RpcUtils .... | org . junit . Assert . assertEquals ( 0 , ret ) |
testFindServer ( ) { org . apache . druid . server . router . QueryHostFinder queryRunner = new org . apache . druid . server . router . QueryHostFinder ( brokerSelector , new org . apache . druid . server . router . RendezvousHashAvaticaConnectionBalancer ( ) ) ; org . apache . druid . client . selector . Server serve... | org . junit . Assert . assertEquals ( "foo" , server . getHost ( ) ) |
getUserSecurityNameWithValidUser ( ) { java . lang . String user = "vmmtestuser" ; java . lang . String securityName = "cn=vmmtestuser,o=ibm,c=us" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSwithSSL . c , "getUserSecurityNameWithValidUser"... | org . junit . Assert . assertEquals ( securityName , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDSwithSSL . servlet . getUserSecurityName ( user ) ) |
testIsEmptyFalse ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( config . isEmpty ( ) ) |
whenCreatingFluentIterableFromArray_shouldContainAllUsers ( ) { com . baeldung . guava . entity . User [ ] usersArray = new com . baeldung . guava . entity . User [ ] { new com . baeldung . guava . entity . User ( 1L , "John" , 45 ) , new com . baeldung . guava . entity . User ( 2L , "Max" , 15 ) } ; com . google . com... | org . junit . Assert . assertThat ( users . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 2 ) ) |
nextNumber ( ) { victim = new org . sejda . sambox . input . COSParser ( inMemorySeekableSourceFrom ( "1" . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } nextNumber ( ) { victim = new org . sejda . sambox . input . COSParser ( inMemorySeekableSourceFrom ( "1" . getBytes ( ) ) ) ; org . junit . Assert . assertEquals ( CO... | org . junit . Assert . assertEquals ( COSInteger . ONE , victim . nextNumber ( ) ) |
testStreamTaskLogWithNegative ( ) { final java . lang . String testLog = "hello<sp>this<sp>is<sp>a<sp>log" ; final java . lang . String logPath = ( ( org . apache . druid . storage . google . GoogleTaskLogsTest . prefix ) + "/" ) + ( org . apache . druid . storage . google . GoogleTaskLogsTest . taskid ) ; expect ( sto... | org . junit . Assert . assertEquals ( writer . toString ( ) , testLog . substring ( ( ( testLog . length ( ) ) - 3 ) ) ) |
testSkipLong ( ) { long sentinel = Long . MAX_VALUE ; org . apache . trevni . OutputBuffer out = new org . apache . trevni . OutputBuffer ( ) ; out . writeValue ( Long . MAX_VALUE , ValueType . LONG ) ; out . writeLong ( sentinel ) ; org . apache . trevni . InputBuffer in = new org . apache . trevni . InputBuffer ( new... | org . junit . Assert . assertEquals ( sentinel , in . readLong ( ) ) |
injectIntoWith ( ) { org . eclipse . collections . api . collection . MutableCollection < java . lang . Integer > objects = this . newWith ( 1 , 2 , 3 ) ; java . lang . Integer result = objects . injectIntoWith ( 1 , ( injectedValued , item , parameter ) -> ( injectedValued + item ) + parameter , 0 ) ; "<AssertPlaceHol... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 7 ) , result ) |
testHasPageConfigurationForId ( ) { com . eclipsesource . tabris . ui . UIConfiguration configuration = new com . eclipsesource . tabris . ui . UIConfiguration ( ) ; com . eclipsesource . tabris . ui . PageConfiguration pageConfiguration = new com . eclipsesource . tabris . ui . PageConfiguration ( "foo" , com . eclips... | org . junit . Assert . assertSame ( pageConfiguration , actualPageConfiguration ) |
shouldReturnMultiDay2 ( ) { java . time . LocalDate st = java . time . LocalDate . now ( ) . minusDays ( 4 ) ; java . time . LocalDate et = st . plusDays ( 4 ) ; entry . changeStartDate ( st ) ; entry . changeEndDate ( et ) ; boolean multiDay = entry . isMultiDay ( ) ; "<AssertPlaceHolder>" ; } isMultiDay ( ) { return ... | org . junit . Assert . assertThat ( multiDay , org . hamcrest . Matchers . is ( true ) ) |
testTaggedDerivativeGauge ( ) { taggedMetric = new com . github . sps . metrics . TaggedDerivativeGauge < java . lang . Integer , java . lang . Integer > ( mock ( com . codahale . metrics . Gauge . class ) ) { @ com . github . sps . metrics . Override public java . util . Map < java . lang . String , java . lang . Stri... | org . junit . Assert . assertEquals ( tags , taggedMetric . getTags ( ) ) |
testExceptionallyComposeUnused ( ) { final java . util . concurrent . CompletionStage < java . lang . String > future = java . util . concurrent . CompletableFuture . completedFuture ( "hello" ) ; final java . util . concurrent . CompletionStage < java . lang . String > composed = com . spotify . futures . CompletableF... | org . junit . Assert . assertEquals ( "hello" , com . spotify . futures . CompletableFuturesExtra . getCompleted ( composed ) ) |
deveObterSerieComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados dados = new com . fincatto . documentofiscal . nfe400 . classes . evento . inutilizacao . NFRetornoEventoInutilizacaoDados ( ) ; final java . lang . String serie = "088"... | org . junit . Assert . assertEquals ( serie , dados . getSerie ( ) ) |
transferTo ( ) { java . io . File dest = new java . io . File ( "/dest" ) ; javax . xml . ws . Holder < java . lang . String > destName = new javax . xml . ws . Holder ( ) ; new mockit . MockUp < javax . servlet . http . Part > ( part ) { @ mockit . Mock void write ( java . lang . String fileName ) throws java . io . I... | org . junit . Assert . assertEquals ( dest . getPath ( ) , destName . value ) |
testIsSyntheticOnSyntheticClass ( ) { com . openpojo . reflection . PojoClass syntheticPojoClass = com . openpojo . reflection . impl . PojoClassImplTest . getPojoClassImplForClass ( com . openpojo . reflection . impl . AClassWithSythetics . class ) ; com . openpojo . validation . affirm . Affirm . affirmEquals ( "Expe... | org . junit . Assert . assertNotNull ( constructor ) |
testXsalsa20HappyFlow ( ) { org . abstractj . kalium . crypto . Random random = new org . abstractj . kalium . crypto . Random ( ) ; org . abstractj . kalium . crypto . Advanced advanced = new org . abstractj . kalium . crypto . Advanced ( ) ; byte [ ] nonce = random . randomBytes ( 24 ) ; byte [ ] key = random . rando... | org . junit . Assert . assertEquals ( pwd , new java . lang . String ( plaintext ) ) |
save_unbound_noChanges ( ) { com . vaadin . data . Binder < com . vaadin . tests . data . bean . Person > binder = new com . vaadin . data . Binder ( ) ; com . vaadin . tests . data . bean . Person person = new com . vaadin . tests . data . bean . Person ( ) ; int age = 10 ; person . setAge ( age ) ; binder . writeBean... | org . junit . Assert . assertEquals ( age , person . getAge ( ) ) |
testSetResidueNumberUsage ( ) { java . util . List < org . biojava . nbio . structure . Group > resNumgroups = new java . util . ArrayList < org . biojava . nbio . structure . Group > ( ) ; for ( int i = 0 ; i < ( bigTestNumber ) ; i ++ ) { org . biojava . nbio . structure . ResidueNumber resNum = new org . biojava . n... | org . junit . Assert . assertEquals ( bigTestNumber , groupsSize ) |
setCallbackTest ( ) { presenter . showDialog ( null , callback ) ; "<AssertPlaceHolder>" ; } showDialog ( int , int ) { this . show ( ) ; this . setPopupPosition ( ( x - ( getOffsetWidth ( ) ) ) , ( y + 1 ) ) ; } | org . junit . Assert . assertNotNull ( presenter . callback ) |
retrieveAandConly_CFirst_range ( ) { com . redhat . lightblue . crud . FindRequest fr = new com . redhat . lightblue . crud . FindRequest ( ) ; fr . setQuery ( query ( "{'field':'obj1.c.*.objectType','op':'=','rvalue':'C'}" ) ) ; fr . setProjection ( projection ( "[{'field':'*','recursive':1},{'field':'obj1.c'}]" ) ) ;... | org . junit . Assert . assertEquals ( 1 , response . getEntityData ( ) . size ( ) ) |
testLoggerInstantiationException ( ) { final com . github . vbauer . herald . logger . impl . JavaUtilLogFactory logFactory = new com . github . vbauer . herald . logger . impl . JavaUtilLogFactory ( ) ; try { throw new com . github . vbauer . herald . exception . LoggerInstantiationException ( logFactory ) ; } catch (... | org . junit . Assert . assertThat ( logFactory , org . hamcrest . Matchers . equalTo ( ex . getLoggerFactory ( ) ) ) |
testPatchFilePath ( ) { final java . lang . String patchFilePath = xenServer650Resource . getPatchFilePath ( ) ; final java . lang . String patch = "scripts/vm/hypervisor/xenserver/xenserver65/patch" ; "<AssertPlaceHolder>" ; } getPatchFilePath ( ) { return "scripts/vm/hypervisor/xenserver/xenserver60/patch" ; } | org . junit . Assert . assertEquals ( patch , patchFilePath ) |
getVersionWithErrorReturnsEmptyString ( ) { when ( this . client . execute ( any ( org . apache . http . client . methods . HttpUriRequest . class ) ) ) . thenThrow ( new java . io . IOException ( ) ) ; java . lang . String result = this . mocker . getComponentUnderTest ( ) . getVersion ( ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( "" , result ) |
testConvert ( ) { java . lang . Long enrolmentId = 1L ; org . lnu . is . domain . enrolment . Enrolment enrolment = new org . lnu . is . domain . enrolment . Enrolment ( ) ; enrolment . setId ( enrolmentId ) ; java . lang . Long benefitId = 2L ; org . lnu . is . domain . benefit . Benefit benefit = new org . lnu . is .... | org . junit . Assert . assertEquals ( expected , actual ) |
testEvalNullGlobal ( ) { final java . lang . String drl = ( ( ( ( ( ( "import<sp>" + ( org . drools . testcoverage . common . model . Cheese . class . getCanonicalName ( ) ) ) + "\n" ) + "global<sp>Boolean<sp>b\n" ) + "rule<sp>R<sp>when\n" ) + "<sp>eval(b)\n" ) + "then\n" ) + "end\n" ; final org . kie . api . KieBase k... | org . junit . Assert . assertEquals ( 0 , ksession . fireAllRules ( ) ) |
testGetOutstreamIds ( ) { java . lang . String tsSource = "parser/resources/testtool2.xml" ; toolSpec = new org . apache . cxf . tools . common . toolspec . ToolSpec ( getClass ( ) . getResourceAsStream ( tsSource ) , false ) ; "<AssertPlaceHolder>" ; } getOutstreamIds ( ) { java . util . List < java . lang . String > ... | org . junit . Assert . assertTrue ( ( ( toolSpec . getOutstreamIds ( ) . size ( ) ) == 1 ) ) |
deveObterVersaoAplicacaoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; final java . lang . String versaoApli... | org . junit . Assert . assertEquals ( versaoAplicacao , retornoConsultaCadastroDados . getVersaoAplicacao ( ) ) |
shouldCloseTheIterableWhenFullyCached ( ) { final uk . gov . gchq . gaffer . commonutil . iterable . CloseableIterable < java . lang . Integer > iterable = mock ( uk . gov . gchq . gaffer . commonutil . iterable . CloseableIterable . class ) ; given ( iterable . iterator ( ) ) . willReturn ( new uk . gov . gchq . gaffe... | org . junit . Assert . assertEquals ( uk . gov . gchq . gaffer . commonutil . CachingIterableTest . SMALL_LIST , com . google . common . collect . Lists . newArrayList ( cachingIterable ) ) |
testParsingPhilosopherFeatureCollectionStream ( ) { java . net . URL docURL = org . deegree . gml . feature . GMLFeatureReaderTest . class . getResource ( "../misc/feature/Philosopher_FeatureCollection.xml" ) ; org . deegree . gml . GMLStreamReader gmlReader = org . deegree . gml . GMLInputFactory . createGMLStreamRead... | org . junit . Assert . assertEquals ( 7 , i ) |
fallbackToGenericJpaForUnknownPersistenceProvider ( ) { javax . persistence . EntityManager em = mockProviderSpecificEntityManagerInterface ( "foo.bar.unknown.jpa.JpaEntityManager" ) ; "<AssertPlaceHolder>" ; } fromEntityManager ( javax . persistence . EntityManager ) { org . springframework . util . Assert . notNull (... | org . junit . Assert . assertThat ( fromEntityManager ( em ) , org . hamcrest . CoreMatchers . is ( org . springframework . data . jpa . provider . GENERIC_JPA ) ) |
shouldBeAbleToChangeTheUuidOfRelationshipNotConfigured ( ) { org . neo4j . graphdb . Node node ; org . neo4j . graphdb . Node another ; registerModuleWithLabelsAndTypes ( ) ; try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { node = database . createNode ( testLabel ) ; another = database . creat... | org . junit . Assert . assertEquals ( "aNewUuid" , r . getProperty ( uuidConfiguration . getUuidProperty ( ) ) ) |
emptyObject ( ) { final javax . json . stream . JsonParser parser = javax . json . Json . createParser ( new java . io . StringReader ( "" ) ) ; "<AssertPlaceHolder>" ; parser . close ( ) ; } hasNext ( ) { if ( ( ( currentStructureElement ) != null ) || ( ( previousEvent ) == 0 ) ) { return true ; } if ( ( ( ( ( ( ( ( ... | org . junit . Assert . assertFalse ( parser . hasNext ( ) ) |
testMethodBinding ( ) { final codemining . java . codeutils . binding . JavaApproximateVariableBindingExtractor jabe = new codemining . java . codeutils . binding . JavaApproximateVariableBindingExtractor ( ) ; final java . util . List < codemining . languagetools . bindings . TokenNameBinding > methodVariableBindings ... | org . junit . Assert . assertEquals ( methodVariableBindings . size ( ) , 3 ) |
givenUsersExist_whenFindingByPage_thenUsersAreFoundByPage ( ) { com . baeldung . model . User user = new com . baeldung . model . User ( ) ; user . setName ( "Eric" ) ; user . setAge ( 45 ) ; mongoTemplate . insert ( user ) ; user = new com . baeldung . model . User ( ) ; user . setName ( "Antony" ) ; user . setAge ( 3... | org . junit . Assert . assertThat ( users . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testCopySemanticsForRules2 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>type<sp>ID<sp>(\',\'<sp>ID)*<sp>\';\'<sp>-><sp>^(type<sp>ID)+<sp>;\n" ) + "a" 0 ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;\n" ) ;... | org . junit . Assert . assertEquals ( "a" 1 , found ) |
testBuildWithParametersWithOrderBy ( ) { java . lang . String abbrName = "AN" ; java . lang . String name = "fsdfds" ; org . lnu . is . domain . contact . type . ContactType context = new org . lnu . is . domain . contact . type . ContactType ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; org .... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
countAuditLogs_byEmptyOperationIds ( ) { givenAuditLogs ( ) ; long cnt = countAuditLogsInTx ( operatorIds , 2 , 3 ) ; "<AssertPlaceHolder>" ; } countAuditLogsInTx ( java . util . List , long , long ) { return runTX ( new java . util . concurrent . Callable < java . lang . Long > ( ) { @ org . oscm . auditlog . dao . Ov... | org . junit . Assert . assertEquals ( 2 , cnt ) |
testReturnArray ( ) { java . util . List < java . lang . Integer > returnValue = client . call ( "returnArray" , java . util . List . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 } , returnValue . toArray ( ) ) |
convert_collection_of_primitives_to_array_with_java8 ( ) { java . util . List < java . lang . Double > searchEngineMarketShare = com . google . common . collect . Lists . newArrayList ( ) ; searchEngineMarketShare . add ( 67.1 ) ; searchEngineMarketShare . add ( 16.9 ) ; searchEngineMarketShare . add ( 11.8 ) ; searchE... | org . junit . Assert . assertEquals ( 5 , searchEngineMarketShareArray . length ) |
b ( ) { org . junit . contrib . assumes . AssumesTest . ComplexSmallEffectSmokeTest . log += "b" ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( true , org . hamcrest . CoreMatchers . is ( false ) ) |
testGetHeight_1 ( ) { org . jinstagram . entity . oembed . OembedInformation fixture = new org . jinstagram . entity . oembed . OembedInformation ( ) ; fixture . setVersion ( "" ) ; fixture . setTitle ( "" ) ; fixture . setProviderUrl ( "" ) ; fixture . setUrl ( "" ) ; fixture . setAuthorName ( "" ) ; fixture . setHeig... | org . junit . Assert . assertEquals ( "" , result ) |
testStringMatcher ( ) { java . util . List < java . lang . String > names = new java . util . ArrayList ( ) ; names . add ( "a" ) ; names . add ( "little" ) ; names . add ( "sql" ) ; names . add ( "for" ) ; names . add ( "your" ) ; names . add ( "nosql" ) ; java . lang . String name = "squeal" ; java . lang . String be... | org . junit . Assert . assertEquals ( "sql" , bestMatch ) |
testLifecycleState ( ) { org . apache . bookkeeper . common . component . LifecycleComponent component1 = mock ( org . apache . bookkeeper . common . component . LifecycleComponent . class ) ; when ( component1 . lifecycleState ( ) ) . thenReturn ( Lifecycle . State . INITIALIZED ) ; org . apache . bookkeeper . common ... | org . junit . Assert . assertEquals ( Lifecycle . State . INITIALIZED , stack . lifecycleState ( ) ) |
testBenchmarkWithWritable ( ) { int rc = org . apache . hadoop . util . ToolRunner . run ( new org . apache . hadoop . ipc . RPCCallBenchmark ( ) , new java . lang . String [ ] { "--clientThreads" , "30" , "--serverThreads" , "30" , "--time" , "5" , "--serverReaderThreads" , "4" , "--messageSize" , "1024" , "--engine" ... | org . junit . Assert . assertEquals ( 0 , rc ) |
testAddingConnectionFactories ( ) { final java . lang . String poolName = "propertyForm:resourcesTable:topActionsGroup1:enableButton" 3 + ( generateRandomString ( ) ) ; final java . lang . String description = "Test<sp>Pool<sp>-<sp>" + poolName ; org . glassfish . admingui . devtests . StandaloneTest standaloneTest = n... | org . junit . Assert . assertTrue ( isTextPresent ( poolName ) ) |
constructor_propertyWithWhiteSpace ( ) { java . util . Map < java . lang . String , java . lang . String > props = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; props . put ( "x" , "<sp>a<sp>" ) ; com . hazelcast . simulator . common . TestCase testCase = new com . hazelcast . simulato... | org . junit . Assert . assertEquals ( "a" , testCase . getProperty ( "x" ) ) |
testPosition ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player p = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player ( ) ; p . setID ( ) ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . ... | org . junit . Assert . assertEquals ( r , p . getPosition ( ) ) |
testObjectFieldPropertySupportsNull ( ) { java . lang . reflect . Field field = getClass ( ) . getDeclaredField ( "objectField" ) ; com . codiform . moo . property . Property property = com . codiform . moo . property . PropertyFactory . createProperty ( field , AccessMode . FIELD ) ; "<AssertPlaceHolder>" ; } canSuppo... | org . junit . Assert . assertTrue ( property . canSupportNull ( ) ) |
testUpdateFromRest ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . rest . schema . change . impl . SchemaChangeModel model = new com . gentics . mesh . core . rest . schema . change . impl . SchemaChangeModel ( UPDATEFIELD , "someField" ) ; com . gentics . mesh . core . data .... | org . junit . Assert . assertEquals ( "someField" , change . getFieldName ( ) ) |
geeftToekomstigeIdsPlusHuidigeVanEersteHandeling ( ) { final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoonHisVolledig = nl . bzk . brp . util . testpersoonbouwers . TestPersoonAntwoordPersoon . maakAntwoordPersoon ( ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . Per... | org . junit . Assert . assertEquals ( 2 , actieIdsVoor . size ( ) ) |
getIpRuleSet ( ) { org . apache . usergrid . chop . stack . IpRuleSet set = org . apache . usergrid . chop . api . store . amazon . AmazonIpRuleManagerTest . manager . getIpRuleSet ( org . apache . usergrid . chop . api . store . amazon . AmazonIpRuleManagerTest . ipRuleSet . getName ( ) ) ; "<AssertPlaceHolder>" ; } e... | org . junit . Assert . assertTrue ( org . apache . usergrid . chop . api . store . amazon . AmazonIpRuleManagerTest . ipRuleSet . equals ( set ) ) |
testBreakAtEnd ( ) { analyser . addInputResource ( "src/test/resources/java/refactoring/BreakAtEnd.java" ) ; analyser . run ( ) ; fr . inria . diverse . torgen . inspectorguidget . analyser . Command cmd = analyser . getCommands ( ) . values ( ) . stream ( ) . flatMap ( ( c ) -> c . getCommands ( ) . stream ( ) ) . col... | org . junit . Assert . assertEquals ( 1 , cmd . getStatements ( ) . size ( ) ) |
noSpuriousDecodes ( ) { java . lang . String string = "http://www.foo.com?a=1&num_rooms=1&children=0&int=VA&b=2" ; "<AssertPlaceHolder>" ; } unescape ( java . lang . String ) { return org . jsoup . nodes . Entities . unescape ( string , false ) ; } | org . junit . Assert . assertEquals ( string , org . jsoup . nodes . Entities . unescape ( string ) ) |
testEnabledCrlFromURLRevokedCertFails ( ) { org . codice . ddf . security . handler . pki . CrlChecker crlChecker = getConfiguredCrlChecker ( "encryption-crl-none.properties" ) ; java . lang . String urlPath = java . lang . ClassLoader . getSystemResource ( "crl-revoked.pem" ) . toString ( ) ; crlChecker . setCrlLocati... | org . junit . Assert . assertThat ( crlChecker . passesCrlCheck ( certs ) , org . hamcrest . Matchers . equalTo ( false ) ) |
testRemoveGroupFromRole ( ) { java . util . List < java . lang . String > assignedGroupsList = new java . util . ArrayList ( ) ; assignedGroupsList . add ( org . jbpm . workbench . cm . client . roles . CaseRolesPresenterTest . GROUP ) ; final org . jbpm . workbench . cm . model . CaseRoleAssignmentSummary roleAssignme... | org . junit . Assert . assertTrue ( roleAssignments . getGroups ( ) . isEmpty ( ) ) |
testAttachment ( ) { System . out . println ( "attachment" ) ; ihe . iti . xds_b . _2007 . ProvideAndRegisterDocumentSetRequestType . Document doc = null ; gov . hhs . fha . nhinc . direct . MimeMessageBuilder instance = new gov . hhs . fha . nhinc . direct . MimeMessageBuilder ( null , null , null ) ; gov . hhs . fha ... | org . junit . Assert . assertTrue ( ( result instanceof gov . hhs . fha . nhinc . direct . MimeMessageBuilder ) ) |
testMidKeyEmpty ( ) { org . apache . hadoop . fs . Path dirName = new org . apache . hadoop . fs . Path ( org . apache . hadoop . io . TestMapFile . TEST_DIR , "testMidKeyEmpty.mapfile" ) ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . getLocal ( org . apache . hadoop . io . Tes... | org . junit . Assert . assertEquals ( null , reader . midKey ( ) ) |
testMergeSingle ( ) { java . util . List < com . splicemachine . orc . DiskRange > diskRanges = com . splicemachine . orc . OrcDataSourceUtils . mergeAdjacentDiskRanges ( com . google . common . collect . ImmutableList . of ( new com . splicemachine . orc . DiskRange ( 100 , 100 ) ) , new io . airlift . units . DataSiz... | org . junit . Assert . assertEquals ( diskRanges , com . google . common . collect . ImmutableList . of ( new com . splicemachine . orc . DiskRange ( 100 , 100 ) ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.