input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testInsertOperationToNamedGraph ( ) { java . lang . String queryStr = "PREFIX<sp>dc:<sp><http://purl.org/dc/elements/1.1/><sp>PREFIX<sp>xsd:<sp><http://www.w3.org/2001/XMLSchema#><sp>" + ( ( "INSERT<sp>{<sp>GRAPH<sp><http://example/bookStore2><sp>{<sp>?book<sp>?p<sp>?v<sp>}<sp>}<sp>" + "WHERE<sp>{<sp>GRAPH<sp><http://e... | org . junit . Assert . assertTrue ( referredGraphs . containsAll ( expected ) ) |
testRoundingUpTimestampInWhere ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( "SELECT<sp>*<sp>FROM<sp>ROUND_DATE_TIME_TS_DECIMAL<sp>WHERE<sp>ROUND(ts,<sp>'second')<sp>=<sp>to_date('2012-01-01<sp>14:... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
testGet ( ) { com . streamsets . pipeline . api . impl . ShortTypeSupport ts = new com . streamsets . pipeline . api . impl . ShortTypeSupport ( ) ; short o = 1 ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return clone ( value ) ; } | org . junit . Assert . assertSame ( o , ts . get ( o ) ) |
testElimina ( ) { mx . edu . um . mateo . general . model . Usuario usuario = obtieneUsuario ( ) ; mx . edu . um . mateo . contabilidad . facturas . model . InformeEmpleado informe = new mx . edu . um . mateo . contabilidad . facturas . model . InformeEmpleado ( ) ; informe . setEmpresa ( usuario . getEmpresa ( ) ) ; i... | org . junit . Assert . assertNotNull ( informe . getId ( ) ) |
testGetPolicyGroupsByDomain_errorInGet_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 . class ) ; f... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testDefaultThrowOnErrorWithNotSetSystemProperty ( ) { java . lang . System . clearProperty ( org . apache . sqoop . Sqoop . SQOOP_RETHROW_PROPERTY ) ; org . apache . sqoop . SqoopOptions opts = new org . apache . sqoop . SqoopOptions ( ) ; "<AssertPlaceHolder>" ; } isThrowOnError ( ) { return throwOnError ; } | org . junit . Assert . assertFalse ( opts . isThrowOnError ( ) ) |
testRenderFacet ( ) { com . gargoylesoftware . htmlunit . html . HtmlPage page = webClient . getPage ( ( ( webUrl ) + "faces/renderFacet1.xhtml" ) ) ; com . gargoylesoftware . htmlunit . html . HtmlElement element = page . getHtmlElementById ( "renderFacet:notfound" ) ; "<AssertPlaceHolder>" ; } getPage ( java . lang .... | org . junit . Assert . assertNotNull ( element ) |
testPorcetagem ( ) { java . math . BigDecimal valor = new java . math . BigDecimal ( "311.713" ) ; java . math . BigDecimal porcetagem = new java . math . BigDecimal ( "21.419" ) ; java . math . BigDecimal expResult = new java . math . BigDecimal ( "66.77" ) ; java . math . BigDecimal result = com . chronos . calc . ut... | org . junit . Assert . assertEquals ( expResult , result ) |
testSetNullInput ( ) { java . util . Set < java . lang . String > target = org . oscm . converter . ParameterizedTypes . set ( null , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } set ( java . util . Set , java . lang . Class ) { if ( source == null ) { return java . util . Collections . emptySet ( ) ; } j... | org . junit . Assert . assertNotNull ( target ) |
legacyHealthCheckTest2 ( ) { com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory testServerMessageListenerFactory = new com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory ( TestServerMessageListenerFactory . HandshakeType . DUPLEX , true ) ; com . navercorp . pinpoin... | org . junit . Assert . assertTrue ( serverMessageListener . hasReceivedPing ( ) ) |
testToAndFromPb ( ) { "<AssertPlaceHolder>" ; compareDiskImageConfiguration ( com . google . cloud . compute . deprecated . DiskImageConfigurationTest . CONFIGURATION , com . google . cloud . compute . deprecated . ImageConfiguration . < com . google . cloud . compute . deprecated . DiskImageConfiguration > fromPb ( co... | org . junit . Assert . assertTrue ( ( ( com . google . cloud . compute . deprecated . ImageConfiguration . fromPb ( com . google . cloud . compute . deprecated . DiskImageConfigurationTest . CONFIGURATION . toPb ( ) ) ) instanceof com . google . cloud . compute . deprecated . DiskImageConfiguration ) ) |
shouldCreateFileRequestEntityIfRestRequestHasNonNullFileName ( ) { java . lang . String filename = "filetest" ; smartrics . rest . client . File f = smartrics . rest . client . File . createTempFile ( filename , null ) ; f . deleteOnExit ( ) ; mockHttpMethod = new smartrics . rest . client . MockHttpMethod ( "mock" ) ;... | org . junit . Assert . assertTrue ( mockHttpMethod . isFileRequest ( ) ) |
testPolicyCtorValidFile ( ) { java . net . URL url = this . getClass ( ) . getResource ( "/policyBitsAdmin" ) ; java . io . File policyFile = new java . io . File ( url . getFile ( ) ) ; org . hyperledger . fabric . sdk . ChaincodeEndorsementPolicy policy = new org . hyperledger . fabric . sdk . ChaincodeEndorsementPol... | org . junit . Assert . assertArrayEquals ( policyBits , policy . getChaincodeEndorsementPolicyAsBytes ( ) ) |
testObserverMethodCanBeVetoed ( ) { java . util . Set < javax . enterprise . inject . spi . ObserverMethod < ? super configuratorApp . web . observerMethod . Dodecagon > > observers = bm . resolveObserverMethods ( new configuratorApp . web . observerMethod . Dodecagon ( ) , Any . Literal . INSTANCE ) ; "<AssertPlaceHol... | org . junit . Assert . assertEquals ( observers . size ( ) , 0 ) |
testBadPassword ( ) { java . util . Map < java . lang . String , java . lang . Object > serverProps = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; serverProps . put ( org . wildfly . security . sasl . digest . DigestTest . REALM_PROPERTY , "TestRealm" ) ; javax . security . sasl . Sas... | org . junit . Assert . assertFalse ( client . hasInitialResponse ( ) ) |
TestCancelReservation03 ( ) { org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo inTransactionToken = new org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo ( "testTokenAttribute2" , TransactionTokenType . IN ) ; org . terasoluna . gfw . web . token . transaction . Transact... | org . junit . Assert . assertThat ( resultCommand , org . hamcrest . CoreMatchers . is ( expectedCommand ) ) |
testMapWithNullValue ( ) { java . util . List < org . apache . parquet . schema . Type > typeList = new java . util . ArrayList < org . apache . parquet . schema . Type > ( ) ; typeList . add ( new org . apache . parquet . schema . PrimitiveType ( REQUIRED , INT64 , "key" ) ) ; org . apache . parquet . schema . GroupTy... | org . junit . Assert . assertEquals ( expected , actual ) |
testForwardCalls ( ) { backtype . storm . topology . IRichSpout worker = mock ( backtype . storm . topology . IRichSpout . class ) ; de . hub . cs . dbis . aeolus . spouts . FixedStreamRateDriverSpout driver = new de . hub . cs . dbis . aeolus . spouts . FixedStreamRateDriverSpout ( worker , 10 ) ; backtype . storm . C... | org . junit . Assert . assertEquals ( config , driver . getComponentConfiguration ( ) ) |
invalidTimestampDefaultShouldNotCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createDefinitions ( ToscaTypes . TIMESTAMP , "2001-12-14<sp>21:59:43.10<sp>Z-5" ) ) ; "<Asser... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testToNullModelValue ( ) { java . lang . Object value = converter . toModelValue ( null ) ; "<AssertPlaceHolder>" ; } toModelValue ( java . lang . Double ) { return widgetValue != null ? widgetValue . intValue ( ) : null ; } | org . junit . Assert . assertNull ( value ) |
testGetDetachedValue_AlreadyMappedWritable ( ) { org . apache . crunch . types . writable . WritableType < java . lang . String , org . apache . hadoop . io . Text > stringType = org . apache . crunch . types . writable . Writables . strings ( ) ; java . lang . String value = "test" ; "<AssertPlaceHolder>" ; } getDetac... | org . junit . Assert . assertSame ( value , stringType . getDetachedValue ( value ) ) |
firstValueDefaultConstructor ( ) { io . rainfall . generator . IterationSequenceGenerator sequenceGenerator = new io . rainfall . generator . IterationSequenceGenerator ( ) ; "<AssertPlaceHolder>" ; } next ( ) { return next . getAndIncrement ( ) ; } | org . junit . Assert . assertThat ( sequenceGenerator . next ( ) , org . hamcrest . CoreMatchers . is ( 1L ) ) |
test_adjustInto_fromStartOfYear_notLeapYear ( ) { java . time . LocalDate base = java . time . LocalDate . of ( 2007 , 1 , 1 ) ; java . time . LocalDate expected = base ; for ( int i = 1 ; i <= ( org . threeten . extra . TestDayOfYear . STANDARD_YEAR_LENGTH ) ; i ++ ) { org . threeten . extra . DayOfYear test = org . t... | org . junit . Assert . assertEquals ( expected , test . adjustInto ( base ) ) |
testAddAutocompleteSection ( ) { com . github . bordertech . wcomponents . WDateField dateField = new com . github . bordertech . wcomponents . WDateField ( ) ; java . lang . String sectionName = "foo" ; java . lang . String expected = com . github . bordertech . wcomponents . autocomplete . AutocompleteUtil . getNamed... | org . junit . Assert . assertEquals ( expected , dateField . getAutocomplete ( ) ) |
testDumpMatches2 ( ) { java . lang . String input = "type.toString<sp>matches<sp>\'something\\swith\\tsingle<sp>escapes\'" ; java . lang . String expected = "type.toString<sp>~=<sp>\"something\\swith\\tsingle<sp>escapes\"" ; org . drools . compiler . lang . descr . ConstraintConnectiveDescr descr = parse ( input ) ; ja... | org . junit . Assert . assertEquals ( expected , result ) |
testServiceType_equals_next ( ) { com . navercorp . pinpoint . common . server . bo . SpanEventBo prev = new com . navercorp . pinpoint . common . server . bo . SpanEventBo ( ) ; com . navercorp . pinpoint . common . server . bo . SpanEventBo current = new com . navercorp . pinpoint . common . server . bo . SpanEventBo... | org . junit . Assert . assertEquals ( bitField . getServiceTypeEncodingStrategy ( ) , ServiceTypeEncodingStrategy . PREV_EQUALS ) |
getProgramByUuid_shouldFindObjectGivenValidUuid ( ) { java . lang . String uuid = "eae98b4c-e195-403b-b34a-82d94103b2c0" ; org . openmrs . Program program = org . openmrs . api . context . Context . getProgramWorkflowService ( ) . getProgramByUuid ( uuid ) ; "<AssertPlaceHolder>" ; } getProgramId ( ) { return programId... | org . junit . Assert . assertEquals ( 1 , ( ( int ) ( program . getProgramId ( ) ) ) ) |
shouldCheckLinkIsOnTime ( ) { com . autentia . tnt . businessobject . Link onTimeLink = new com . autentia . tnt . businessobject . Link ( ) ; onTimeLink . setInsertDate ( new java . util . Date ( ) ) ; boolean isOnTime = sut . isOnTime ( onTimeLink ) ; "<AssertPlaceHolder>" ; } isOnTime ( com . autentia . tnt . busine... | org . junit . Assert . assertThat ( isOnTime , org . hamcrest . core . Is . is ( true ) ) |
getCause ( ) { com . miracle . framework . remote . server . exception . ServerException serverException = new com . miracle . framework . remote . server . exception . ServerException ( 1L , new java . lang . RuntimeException ( ) ) ; "<AssertPlaceHolder>" ; } getCause ( ) { com . miracle . framework . remote . client ... | org . junit . Assert . assertThat ( serverException . getCause ( ) , org . hamcrest . CoreMatchers . instanceOf ( com . miracle . framework . remote . server . exception . RuntimeException . class ) ) |
shouldRetrieveActiveLoanOfficersByBranchId ( ) { java . lang . Integer branchId = org . mifos . framework . util . helpers . IntegrationTestObjectMother . sampleBranchOffice ( ) . getOfficeId ( ) . intValue ( ) ; java . util . List < org . mifos . reports . ui . SelectionItem > activeLoanOfficers = this . selectionItem... | org . junit . Assert . assertThat ( activeLoanOfficers . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( false ) ) |
matrixGetTest ( ) { java . lang . String key = com . graphhopper . directions . api . client . api . MatrixApiTest . KEY ; com . graphhopper . directions . api . client . api . List < java . lang . String > point = com . graphhopper . directions . api . client . api . Arrays . asList ( new java . lang . String [ ] { "4... | org . junit . Assert . assertEquals ( 3 , response . getDistances ( ) . size ( ) ) |
addUser ( ) { java . lang . String view = userController . addUser ( model ) ; "<AssertPlaceHolder>" ; verify ( model ) . addAttribute ( eq ( "userForm" ) , argUserForm ( org . apache . commons . lang3 . StringUtils . EMPTY , org . apache . commons . lang3 . StringUtils . EMPTY , org . apache . commons . lang3 . String... | org . junit . Assert . assertEquals ( "/user/edit" , view ) |
canAdjustLastTransactionThatIsADeposit ( ) { org . mifos . framework . util . helpers . Money amountAdjustedTo = org . mifos . framework . TestUtils . createMoney ( "25" ) ; savingsAccount = new org . mifos . domain . builders . SavingsAccountBuilder ( ) . active ( ) . withSavingsProduct ( savingsProduct ) . withCustom... | org . junit . Assert . assertTrue ( result ) |
testSimpleConfigurationCredentialReference ( ) { org . jboss . as . core . model . test . KernelServices kernelServices = createKernelServicesBuilder ( TestModelType . STANDALONE ) . setXmlResource ( "users-standalone.xml" ) . validateDescription ( ) . build ( ) ; "<AssertPlaceHolder>" ; java . lang . String marshalled... | org . junit . Assert . assertTrue ( kernelServices . isSuccessfulBoot ( ) ) |
testStartsWithExpression ( ) { org . odata4j . expression . BoolMethodExpression ex = org . odata4j . expression . Expression . startsWith ( org . odata4j . expression . Expression . string ( "ABCDE" ) , org . odata4j . expression . Expression . string ( "ABC" ) ) ; boolean evaluate = org . odata4j . producer . inmemor... | org . junit . Assert . assertTrue ( evaluate ) |
testMD5HashForFloatWritableKey ( ) { org . apache . hadoop . io . FloatWritable key = new org . apache . hadoop . io . FloatWritable ( 1.025F ) ; org . apache . hadoop . io . MD5Hash md5HashKey1 = co . nubetech . hiho . dedup . HashUtility . getMD5Hash ( key ) ; org . apache . hadoop . io . MD5Hash md5HashKey2 = co . n... | org . junit . Assert . assertEquals ( md5HashKey1 , md5HashKey2 ) |
testCDKBasedAtomTypeConfigurator ( ) { org . openscience . cdk . config . OWLBasedAtomTypeConfigurator configurator = new org . openscience . cdk . config . OWLBasedAtomTypeConfigurator ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( configurator ) |
testGetFileToSend ( ) { System . out . println ( "getFileToSend" ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getFileToSend ( ) ; "<AssertPlaceHolder>" ; } getFileToSend ( ) { return getPropertyAsString ( kg . apc . jmeter . samplers . HTTPRawSampler . FILE_NAME ) ; } | org . junit . Assert . assertEquals ( expResult , result ) |
testParse ( ) { com . google . crypto . tink . proto . KeyTemplate template = com . google . crypto . tink . mac . MacKeyTemplates . HMAC_SHA256_128BITTAG ; com . google . crypto . tink . KeysetHandle handle = com . google . crypto . tink . KeysetHandle . generateNew ( template ) ; com . google . crypto . tink . proto ... | org . junit . Assert . assertEquals ( keyset , handle . getKeyset ( ) ) |
missingScope ( ) { io . opentracing . Scope missingSpan = source . active ( ) ; "<AssertPlaceHolder>" ; } active ( ) { return io . opentracing . noop . NoopScopeManager . NoopScope . INSTANCE ; } | org . junit . Assert . assertNull ( missingSpan ) |
testSetDiskAutodelete ( ) { initializeExpectedInstance ( 2 ) ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; com . google . cloud . compute . deprecated . Operation operation = new com . google . cloud . compute . deprecated . Operation . Builder ( serviceMockReturnsOptions ) . setOperationId ( com ... | org . junit . Assert . assertSame ( operation , instance . setDiskAutoDelete ( "dev0" , true ) ) |
testInstallingAddonWithNoDependency ( ) { int addonCount = registry . getAddons ( ) . size ( ) ; final org . jboss . forge . furnace . addons . AddonId exampleId = org . jboss . forge . furnace . addons . AddonId . fromCoordinates ( "test:no_dep,1.0.0.Final" ) ; addonManager . deploy ( exampleId ) . perform ( ) ; org .... | org . junit . Assert . assertEquals ( ( addonCount + 1 ) , registry . getAddons ( ) . size ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . OrgGroupRole . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjectio... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
getSearchArgument ( ) { org . apache . hadoop . hive . ql . io . sarg . SearchArgument searchArgument = org . apache . hadoop . hive . ql . io . sarg . SearchArgumentFactory . newBuilder ( ) . startAnd ( ) . equals ( "a" , "b" ) . end ( ) . build ( ) ; conf . set ( CorcInputFormat . SEARCH_ARGUMENT , searchArgument . t... | org . junit . Assert . assertThat ( kryo , org . hamcrest . CoreMatchers . is ( searchArgument . toKryo ( ) ) ) |
testExecuteListResultCustomArgsSerializer ( ) { this . template = new org . springframework . data . redis . core . StringRedisTemplate ( ) ; template . setConnectionFactory ( getConnectionFactory ( ) ) ; template . afterPropertiesSet ( ) ; template . boundListOps ( "mylist" ) . leftPushAll ( "a" , "b" , "c" , "d" ) ; ... | org . junit . Assert . assertEquals ( java . util . Collections . singletonList ( "a" ) , result ) |
storeSecret ( ) { eu . abc4trust . keyManager . KeyManager keyManager = new eu . abc4trust . keyManager . KeyManagerImpl ( new eu . abc4trust . keyManager . PersistenceStrategy ( new eu . abc4trust . keyManager . InMemoryKeyStorage ( ) ) , null ) ; eu . abc4trust . cryptoEngine . user . CryptoEngineUser engine = null ;... | org . junit . Assert . assertNotNull ( res ) |
testName ( ) { "<AssertPlaceHolder>" ; } getGeneratorName ( ) { return "HTMLReportGenerator" ; } | org . junit . Assert . assertThat ( this . fixture . getGeneratorName ( ) , org . hamcrest . CoreMatchers . is ( "HTMLReportGenerator" ) ) |
testRequestWrapper_getServletPath ( ) { org . eclipse . rap . rwt . osgi . internal . HttpServletRequest servletRequest = mock ( org . eclipse . rap . rwt . osgi . internal . HttpServletRequest . class ) ; org . eclipse . rap . rwt . osgi . internal . ServletContext servletContext = mock ( org . eclipse . rap . rwt . o... | org . junit . Assert . assertEquals ( "/foo" , servletPath ) |
backspaceInTheStartDoesntWork ( ) { jetbrains . jetpad . projectional . cell . ProjectionalPropertySynchronizerTest . Child3 child = new jetbrains . jetpad . projectional . cell . ProjectionalPropertySynchronizerTest . Child3 ( ) ; container . child . set ( child ) ; focusChild ( child , 0 ) ; press ( Key . BACKSPACE )... | org . junit . Assert . assertSame ( child , container . child . get ( ) ) |
loadLastOrganizationHistory_nonExisting ( ) { final long nonExistingKey = 1L ; org . oscm . domobjects . OrganizationHistory organization = dao . loadLastOrganizationHistory ( nonExistingKey ) ; "<AssertPlaceHolder>" ; } loadLastOrganizationHistory ( java . lang . Long ) { org . oscm . domobjects . Organization org = n... | org . junit . Assert . assertNull ( organization ) |
testListAllWithBiggerLimit ( ) { java . util . List < uk . ac . bbsrc . tgac . miso . core . data . Study > studies = dao . listAllWithLimit ( 50L ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; } | org . junit . Assert . assertEquals ( 6 , studies . size ( ) ) |
pathUtilTest7 ( ) { java . io . File [ ] roots = java . io . File . listRoots ( ) ; java . io . File basePath = new java . io . File ( ( ( roots [ 0 ] ) + "some" ) ) ; java . io . File relativePath = new java . io . File ( ( ( ( ( roots [ 0 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir" ) ) ; java . la... | org . junit . Assert . assertEquals ( path , "dir" ) |
testParseURL ( ) { final java . lang . String url = "jdbc:elasticsearch://10.12.117.30:9301/elasticsearch?index=my_csv_index&type=my_csv_type" ; final org . codefamily . crabs . jdbc . Protocol actual = org . codefamily . crabs . jdbc . Protocol . parseURL ( url ) ; final java . util . Properties properties = new java ... | org . junit . Assert . assertEquals ( expected , actual ) |
isAlignmentSoftClipped_should_handle_null_cigar ( ) { htsjdk . samtools . SAMRecord r = new htsjdk . samtools . SAMRecord ( getContext ( ) . getBasicSamHeader ( ) ) ; r . setCigar ( null ) ; "<AssertPlaceHolder>" ; } isAlignmentSoftClipped ( htsjdk . samtools . SAMRecord ) { return au . edu . wehi . idsv . sam . SAMRec... | org . junit . Assert . assertFalse ( au . edu . wehi . idsv . sam . SAMRecordUtil . isAlignmentSoftClipped ( r ) ) |
testIsProjectSelected_Selected ( ) { final org . kie . workbench . common . screens . examples . model . ImportProject project = mock ( org . kie . workbench . common . screens . examples . model . ImportProject . class ) ; model . addProject ( project ) ; "<AssertPlaceHolder>" ; } isProjectSelected ( org . kie . workb... | org . junit . Assert . assertTrue ( page . isProjectSelected ( project ) ) |
testNoPlanWithPropertyRestrictions ( ) { org . apache . jackrabbit . oak . query . ast . SelectorImpl selector = org . apache . jackrabbit . oak . plugins . index . solr . query . SolrQueryIndexTest . newSelector ( nodeState , "a" ) ; org . apache . jackrabbit . oak . plugins . index . solr . query . SolrQueryIndex sol... | org . junit . Assert . assertEquals ( 0 , plans . size ( ) ) |
hostname_and_port_from_credentials ( ) { java . lang . String hostname = "127.0.0.1" ; com . orange . cloud . servicebroker . filter . securitygroups . domain . Port port = com . orange . cloud . servicebroker . filter . securitygroups . domain . ImmutablePort . of ( 6379 ) ; java . util . Map < java . lang . String , ... | org . junit . Assert . assertEquals ( new com . orange . cloud . servicebroker . filter . securitygroups . domain . Destination ( hostname , port ) , com . orange . cloud . servicebroker . filter . securitygroups . filter . ConnectionInfoFactory . fromCredentials ( credentials ) ) |
testMainClassGetRuntime ( ) { com . streamsets . datacollector . main . DataCollectorMain main = new com . streamsets . datacollector . main . DataCollectorMain ( ) ; "<AssertPlaceHolder>" ; } getRuntime ( ) { return java . lang . Runtime . getRuntime ( ) ; } | org . junit . Assert . assertEquals ( java . lang . Runtime . getRuntime ( ) , main . getRuntime ( ) ) |
phase_sskip ( ) { com . asakusafw . yaess . core . task . ExecutionTaskTest . ProfileBuilder prf = new com . asakusafw . yaess . core . task . ExecutionTaskTest . ProfileBuilder ( folder . getRoot ( ) ) ; com . asakusafw . yaess . core . task . ExecutionTask task = prf . task ( ) ; task . getSkipFlows ( ) . add ( "test... | org . junit . Assert . assertThat ( results , is ( java . util . Collections . emptyList ( ) ) ) |
int2 ( ) { org . apache . jena . dboe . base . record . Record r = intToRecord ( ( - 99 ) , 4 ) ; int v = recordToInt ( r ) ; "<AssertPlaceHolder>" ; } recordToInt ( org . apache . jena . tdb . base . record . Record ) { return org . apache . jena . atlas . lib . Bytes . getInt ( key . getKey ( ) ) ; } | org . junit . Assert . assertEquals ( v , ( - 99 ) ) |
test20_shouldListSnapshots ( ) { org . springframework . shell . core . CommandResult cr = getShell ( ) . executeCommand ( "connect<sp>--login<sp>johndoe<sp>--password<sp>abc2015" ) ; cr = getShell ( ) . executeCommand ( "list-snapshot" ) ; java . lang . String result = cr . getResult ( ) . toString ( ) ; java . lang .... | org . junit . Assert . assertEquals ( expectedResult , result ) |
setValueMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveMeterCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveMeterCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_METER ) ) ) ; org . openhab . binding . zwave . i... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV1 ) ) |
testBuildSesssionFactory ( ) { java . util . List < org . makersoft . shards . cfg . ShardConfiguration > shardConfigs = new java . util . ArrayList < org . makersoft . shards . cfg . ShardConfiguration > ( ) ; final java . lang . String resource_0 = "mybatis/mybatis-config-0.xml" ; final java . lang . String resource_... | org . junit . Assert . assertNotNull ( factory ) |
testDeliveryAnnotationsReturnedOnNonEmptyDeliveryAnnotationsMap ( ) { org . apache . qpid . jms . provider . amqp . message . AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade ( ) ; java . util . Map < org . apache . qpid . proton . amqp . Symbol , java . lang . Object > deliveryAnnotationsMap = new java ... | org . junit . Assert . assertNotNull ( amqpMessageFacade . getDeliveryAnnotations ( ) ) |
testSetupCommand ( ) { final com . cloud . hypervisor . xenserver . resource . XenServer610Resource xenServer610Resource = new com . cloud . hypervisor . xenserver . resource . XenServer610Resource ( ) ; final com . cloud . legacymodel . dc . HostEnvironment env = org . mockito . Mockito . mock ( com . cloud . legacymo... | org . junit . Assert . assertFalse ( answer . getResult ( ) ) |
doesNotRunWhenSubjectContainsOnlyStandardCharsOverLengthOfThree ( ) { org . atlasapi . media . entity . Item subject = makeItem ( 2L , "itemitemitem" , Publisher . AMAZON_UNBOX ) ; org . atlasapi . equiv . results . scores . ScoredCandidates < org . atlasapi . media . entity . Item > candidates = generator . generate (... | org . junit . Assert . assertThat ( candidates . candidates ( ) . isEmpty ( ) , org . hamcrest . core . Is . is ( true ) ) |
testGroupNames ( eu . trentorise . opendata . jackan . CkanClient ) { java . util . List < java . lang . String > gl = client . getGroupNames ( ) ; "<AssertPlaceHolder>" ; } getGroupNames ( ) { return groupNames ; } | org . junit . Assert . assertTrue ( ( ( gl . size ( ) ) > 0 ) ) |
testEmbeddedWebAPIConfig ( ) { org . glassfish . tests . embedded . web . WebListener testListener = org . glassfish . tests . embedded . web . EmbeddedAddServletTest . embedded . createWebListener ( "test-listener" , org . glassfish . tests . embedded . web . HttpListener . class ) ; testListener . setPort ( 9090 ) ; ... | org . junit . Assert . assertTrue ( testvs ) |
shouldNotEqualGivenOneIsEmpty ( ) { uk . co . webamoeba . mockito . collections . util . OrderedSet < java . lang . Object > orderedSet1 = new uk . co . webamoeba . mockito . collections . util . OrderedSet < java . lang . Object > ( java . util . Arrays . < java . lang . Object > asList ( "GHI" , 3L ) ) ; uk . co . we... | org . junit . Assert . assertFalse ( equals ) |
testNegative ( ) { mikera . matrixx . AMatrix a = mikera . matrixx . Matrix . create ( new double [ ] [ ] { new double [ ] { - 1 } } ) ; mikera . matrixx . decompose . ICholeskyResult r = mikera . matrixx . decompose . Cholesky . decompose ( a ) ; "<AssertPlaceHolder>" ; } decompose ( mikera . matrixx . AMatrix ) { ret... | org . junit . Assert . assertNull ( r ) |
testFalseSvcConfigNoTransportHeader ( ) { boolean success = false ; try { com . ebay . soaframework . spf . impl . internal . config . ServiceConfigManager . getInstance ( ) . setConfigTestCase ( "configValidatePayloadFalse" ) ; com . ebay . marketplace . advertising . v1 . services . GetMessagesForTheDayRequest param0... | org . junit . Assert . assertTrue ( success ) |
testSetFirmwareRevisionFailure ( ) { java . lang . String adapter = "hci0" ; org . eclipse . kura . example . ble . tisensortag . TiSensorTagBuilder builder = new org . eclipse . kura . example . ble . tisensortag . TiSensorTagBuilder ( adapter , true , false ) ; org . eclipse . kura . bluetooth . BluetoothGatt gattMoc... | org . junit . Assert . assertNull ( tag . getFirmareRevision ( ) ) |
incrementAndGetVersionMustBeAtomic ( ) { try ( org . neo4j . kernel . impl . store . MetaDataStore store = newMetaDataStore ( ) ) { long initialVersion = store . incrementAndGetVersion ( ) ; int threads = java . lang . Runtime . getRuntime ( ) . availableProcessors ( ) ; int iterations = 500 ; org . neo4j . test . Race... | org . junit . Assert . assertThat ( store . incrementAndGetVersion ( ) , org . hamcrest . Matchers . is ( ( ( initialVersion + ( threads * iterations ) ) + 1 ) ) ) |
testServer ( ) { int localPort = org . deeplearning4j . nearestneighbor . server . NearestNeighborTest . getAvailablePort ( ) ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 7 ) ; org . nd4j . linalg . api . ndarray . INDArray rand = org . nd4j . linalg . factory . Nd4j . randn ( 10 , 5 ) ; java . io... | org . junit . Assert . assertEquals ( 5 , result . getResults ( ) . size ( ) ) |
returnsCorrectLastTransactionTimestampWhenStartedForClosedTx ( ) { long lastCommittedTxTimestamp = 4242 ; org . neo4j . kernel . impl . api . KernelTransactionImplementation tx = mock ( org . neo4j . kernel . impl . api . KernelTransactionImplementation . class ) ; when ( tx . lastTransactionTimestampWhenStarted ( ) ) ... | org . junit . Assert . assertEquals ( lastCommittedTxTimestamp , handle . lastTransactionTimestampWhenStarted ( ) ) |
testWrongCriterion ( ) { org . opencastproject . index . service . resources . list . query . ResourceListQueryImpl query = makeQuery ( new org . opencastproject . index . service . resources . list . query . StringListFilter ( "doesntExist" , "HOST<sp>1" ) ) ; "<AssertPlaceHolder>" ; } isCompliant ( org . opencastproj... | org . junit . Assert . assertFalse ( service . isCompliant ( query ) ) |
testHeapCacualtion_11 ( ) { tool = new org . teiid . sizing . Caculation ( 4 , 400 , true ) ; "<AssertPlaceHolder>" ; } heapCaculation ( ) { int sources = this . getSource_count ( ) ; int concurrent = this . getQueries_concurrent ( ) ; int total_in_mb = ( ( concurrent * 5 ) * sources ) + 300 ; int heap = ( total_in_mb ... | org . junit . Assert . assertEquals ( 9 , tool . heapCaculation ( ) ) |
testGetNameWithAs ( ) { org . sagebionetworks . table . query . model . DerivedColumn element = org . sagebionetworks . table . query . util . SqlElementUntils . createDerivedColumn ( "'bar'<sp>as<sp>foo" ) ; "<AssertPlaceHolder>" ; } getDisplayName ( ) { java . lang . String name = null ; if ( ( asClause ) != null ) {... | org . junit . Assert . assertEquals ( "foo" , element . getDisplayName ( ) ) |
testTransformationInExtendingClass ( ) { long expected = 42 ; org . evosuite . runtime . agent . org . evosuite . runtime . System . setCurrentTimeMillis ( expected ) ; try { org . evosuite . runtime . agent . InstrumentingAgent . activate ( ) ; org . evosuite . runtime . agent . ExtendingTimeC time = new org . evosuit... | org . junit . Assert . assertEquals ( expected , time . getTime ( ) ) |
isDestroyedWithLessThanZeroHitPoints ( ) { hitPointBasedDestructibility . reduce ( ( ( com . fundynamic . d2tm . game . behaviors . HitPointBasedDestructibilityTest . MAX_HIT_POINTS ) + 1 ) ) ; "<AssertPlaceHolder>" ; } isZero ( ) { return ( ( getXAsInt ( ) ) == 0 ) && ( ( getYAsInt ( ) ) == 0 ) ; } | org . junit . Assert . assertTrue ( hitPointBasedDestructibility . isZero ( ) ) |
testGetBooleanValue ( ) { org . oscm . domobjects . Parameter p = new org . oscm . domobjects . Parameter ( ) ; p . setValue ( "true" ) ; "<AssertPlaceHolder>" ; } getBooleanValue ( ) { return java . lang . Boolean . parseBoolean ( getValue ( ) ) ; } | org . junit . Assert . assertEquals ( true , p . getBooleanValue ( ) ) |
contentTypeShouldEqualWithItself ( ) { java . lang . String contentTypeString = "text/just+for+test" ; com . navercorp . volleyextensions . volleyer . http . ContentType contentType = com . navercorp . volleyextensions . volleyer . http . ContentType . createContentType ( contentTypeString ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertTrue ( contentType . equals ( contentType ) ) |
testRenewLeaseWhenLeaseStillAlive ( ) { dhcpPool = initPool ( org . projectfloodlight . openflow . types . IPv4Address . of ( "10.0.0.1" ) , 1 ) ; dhcpPool . assignLeaseToClient ( org . projectfloodlight . openflow . types . MacAddress . of ( 1 ) , 60 ) ; "<AssertPlaceHolder>" ; } renewLeaseOfMAC ( org . projectfloodli... | org . junit . Assert . assertTrue ( dhcpPool . renewLeaseOfMAC ( org . projectfloodlight . openflow . types . MacAddress . of ( 1 ) , 60 ) ) |
testSendCancel ( ) { final java . lang . String messageId = "testSendCancel" ; final com . arjuna . webservices11 . wsarj . InstanceIdentifier instanceIdentifier = new com . arjuna . webservices11 . wsarj . InstanceIdentifier ( "2" ) ; javax . xml . ws . wsaddressing . W3CEndpointReference endpoint = com . arjuna . wst... | org . junit . Assert . assertTrue ( details . hasCancel ( ) ) |
testCorrelationWithoutMessageDoesNotMatchStartEvent ( ) { try { runtimeService . createMessageCorrelation ( null ) . processInstanceVariableEquals ( "variable" , "value2" ) . correlate ( ) ; org . junit . Assert . fail ( "exception<sp>expected" ) ; } catch ( org . camunda . bpm . engine . MismatchingMessageCorrelationE... | org . junit . Assert . assertTrue ( correlatedExecutions . isEmpty ( ) ) |
testShouldBeAbleToFindAnElementThatDoesNotSupportTheNameProperty ( ) { driver . get ( pages . nestedPage ) ; org . openqa . selenium . WebElement element = driver . findElement ( org . openqa . selenium . By . name ( "div1" ) ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return commandProcessor ... | org . junit . Assert . assertThat ( element . getAttribute ( "name" ) , org . hamcrest . Matchers . is ( "div1" ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . bookmarks . model . BookmarksFolder > bookmarksFolders = _persistence . fetchByPrimaryKey... | org . junit . Assert . assertTrue ( bookmarksFolders . isEmpty ( ) ) |
calendarUtils_getStartOfDay_calendarAsStartOfDayReturned ( ) { java . util . Calendar testInput = java . util . Calendar . getInstance ( ) ; testInput . set ( 2014 , Calendar . MARCH , 10 ) ; java . util . Calendar expResult = ( ( java . util . Calendar ) ( testInput . clone ( ) ) ) ; expResult . set ( Calendar . HOUR_... | org . junit . Assert . assertEquals ( expResult , result ) |
testTopLevelInterfaceIsNotStatic ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "interface<sp>Foo<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; final org . eclipse . xtex... | org . junit . Assert . assertFalse ( inferred . isStatic ( ) ) |
testWithCatalog ( ) { software . amazon . ion . IonCatalog catalog = new software . amazon . ion . system . SimpleCatalog ( ) ; software . amazon . ion . system . IonSystemBuilder b = software . amazon . ion . system . IonSystemBuilder . standard ( ) . withCatalog ( catalog ) ; "<AssertPlaceHolder>" ; } getCatalog ( ) ... | org . junit . Assert . assertSame ( catalog , b . getCatalog ( ) ) |
testThrowCheckedException ( ) { java . io . IOException expected = new java . io . IOException ( "EXPECTED<sp>ERROR" ) ; java . io . IOException actual = null ; try { org . slieb . throwables . ConsumerWithThrowable . aConsumerThatUnsafelyThrowsUnchecked ( ( v1 ) -> { throw expected ; } ) . accept ( null ) ; org . juni... | org . junit . Assert . assertEquals ( expected , actual ) |
getCategories ( ) { husacct . common . dto . CategoryDTO [ ] dtos = husaccttest . validate . ValidateTest . validate . getCategories ( ) ; java . lang . String [ ] ruleTypeCategories = new java . lang . String [ ] { RuleTypeCategories . PROPERTY_RULE_TYPES . getCategoryName ( ) . toLowerCase ( ) . replace ( "<sp>" , ""... | org . junit . Assert . assertArrayEquals ( ruleTypeCategories , getCategoryStringArray ( dtos ) ) |
shouldCopySubstringToStartOfByteBuffer ( ) { byte [ ] buffer = new byte [ 10 ] ; java . util . Arrays . fill ( buffer , ( ( byte ) ( 0 ) ) ) ; java . lang . String s = "TAG-" ; com . mpatric . mp3agic . BufferTools . stringIntoByteBuffer ( s , 1 , 2 , buffer , 0 ) ; byte [ ] expectedBuffer = new byte [ ] { com . mpatri... | org . junit . Assert . assertArrayEquals ( expectedBuffer , buffer ) |
testCharSetWithMissingEscapeChar ( ) { java . lang . String grammar = "lexer<sp>grammar<sp>L;\n" + ( "I<sp>:<sp>[0-9]+<sp>{System.out.println(\"I\");}<sp>;\n" + "WS<sp>:<sp>[<sp>\\n]+<sp>-><sp>skip<sp>;" ) ; java . lang . String found = execLexer ( "L.g4" , grammar , "L" , "34<sp>" ) ; java . lang . String expecting = ... | org . junit . Assert . assertEquals ( expecting , found ) |
testDeleteAsyncTrue ( ) { initializeExpectedSink ( 1 ) ; expect ( logging . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( logging . deleteSinkAsync ( com . google . cloud . logging . SinkTest . NAME ) ) . andReturn ( com . google . api . core . ApiFutures . immediateFuture ( true ) ) ; replay ( logging ) ; in... | org . junit . Assert . assertTrue ( sink . deleteAsync ( ) . get ( ) ) |
testFromEbXML ( ) { transformer . toEbXML ( query , ebXML ) ; org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindSubmissionSetsQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . FindSubmissionSetsQuery ( ) ; transformer . fromEbXML ( result , ebXML ) ... | org . junit . Assert . assertEquals ( query , result ) |
testUpdateConflictException ( ) { when ( mockNode . getETag ( ) ) . thenReturn ( "wrongEtag" ) ; try { nodeManager . update ( mockUserInfo , mockNode ) ; org . junit . Assert . fail ( ) ; } catch ( org . sagebionetworks . repo . model . ConflictingUpdateException e ) { "<AssertPlaceHolder>" ; } verify ( mockNodeDao ) .... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( mockNode . getId ( ) ) ) |
convertConfigurationSyncRequestTest ( ) { org . kaaproject . kaa . server . sync . platform . AvroEncDec avroEncDec = new org . kaaproject . kaa . server . sync . platform . AvroEncDec ( ) ; java . lang . reflect . Method method = org . kaaproject . kaa . server . sync . platform . AvroEncDec . class . getDeclaredMetho... | org . junit . Assert . assertNull ( method . invoke ( avroEncDec , syncRequest ) ) |
testParseQuery_Format ( ) { java . lang . String query = "$resultFormat=dataArray" ; de . fraunhofer . iosb . ilt . frostserver . query . Query expResult = new de . fraunhofer . iosb . ilt . frostserver . query . Query ( ) ; expResult . setFormat ( "dataArray" ) ; de . fraunhofer . iosb . ilt . frostserver . query . Qu... | org . junit . Assert . assertEquals ( expResult , result ) |
test_Filter13 ( ) { java . lang . String expected = "bab" ; java . lang . String actual ; org . osgi . framework . Bundle bundle = installBundle ( org . eclipse . equinox . http . servlet . tests . TEST_BUNDLE_1 ) ; try { bundle . start ( ) ; actual = requestAdvisor . request ( "something/a.TestFilter13" ) ; } finally ... | org . junit . Assert . assertEquals ( expected , actual ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.